net.wimpi.pim.contact.basicimpl
Class PhoneNumberImpl

java.lang.Object
  |
  +--net.wimpi.pim.util.AbstractIdentifiable
        |
        +--net.wimpi.pim.contact.basicimpl.PhoneNumberImpl
All Implemented Interfaces:
Identifiable, PhoneNumber, java.io.Serializable

public class PhoneNumberImpl
extends AbstractIdentifiable
implements PhoneNumber

A basic and simple implementation of a PhoneNumber.

Version:
0.1 (22/07/2003)
Author:
Dieter Wimberger
See Also:
Serialized Form

Field Summary
protected  boolean m_BBS
           
protected  boolean m_Car
           
protected  boolean m_Cellular
           
protected  boolean m_Fax
           
protected  boolean m_Home
           
protected  int m_Index
           
protected  boolean m_ISDN
           
protected  boolean m_Messaging
           
protected  boolean m_MODEM
           
protected  java.lang.String m_Number
           
protected  boolean m_Pager
           
protected  boolean m_PCS
           
protected  boolean m_Preferred
           
protected  boolean m_Video
           
protected  boolean m_Voice
           
protected  boolean m_Work
           
 
Fields inherited from interface net.wimpi.pim.contact.model.PhoneNumber
TYPE_BBS, TYPE_CAR, TYPE_CELLULAR, TYPE_FAX, TYPE_HOME, TYPE_ISDN, TYPE_MESSAGING, TYPE_MODEM, TYPE_PAGER, TYPE_PCS, TYPE_VIDEO, TYPE_VOICE, TYPE_WORK
 
Constructor Summary
PhoneNumberImpl()
           
 
Method Summary
 int getIndex()
           
 java.lang.String getNumber()
          Returns the number of this PhoneNumber.
 boolean isBBS()
          Tests if this PhoneNumber is associated to a bulletin board system.
 boolean isCar()
          Tests if this PhoneNumber is a car phone number.
 boolean isCellular()
          Tests if this PhoneNumber is a cellular phone number.
 boolean isFax()
          Tests if this PhoneNumber is a facsimile number.
 boolean isHome()
          Tests if this PhoneNumber is associated with a residence.
 boolean isISDN()
          Tests if this PhoneNumber is associated with ISDN service.
 boolean isMessaging()
          Tests if this PhoneNumber has voice messaging support.
 boolean isMODEM()
          Tests if this PhoneNumber is connected with a MODEM.
 boolean isPager()
          Tests if this PhoneNumber is a paging device number.
 boolean isPCS()
          Tests if this PhoneNumber is a personal communications services number.
 boolean isPreferred()
          Tests if this PhoneNumber represents a preferred number.
 boolean isType(int TYPE)
          Tests if this PhoneNumber is of a specific type.
 boolean isVideo()
          Tests if this PhoneNumber is a video conferencing number.
 boolean isVoice()
          Tests if this PhoneNumber is a voice number.
 boolean isWork()
          Tests if this PhoneNumber is associated with a place of work.
 void setBBS(boolean b)
          Sets or resets the bbs flag of this PhoneNumber.
 void setCar(boolean car)
          Sets or resets the car flag of this PhoneNumber.
 void setCellular(boolean b)
          Sets or resets the cellular flag of this PhoneNumber.
 void setFax(boolean b)
          Sets or resets the fax flag of this PhoneNumber.
 void setHome(boolean b)
          Sets or resets the home flag of this PhoneNumber.
 void setIndex(int index)
           
 void setISDN(boolean b)
          Sets or resets the ISDN flag of this PhoneNumber.
 void setMessaging(boolean b)
          Sets or resets the messaging flag of this PhoneNumber.
 void setMODEM(boolean b)
          Sets or resets the modem flag of this PhoneNumber.
 void setNumber(java.lang.String number)
          Sets the number of this PhoneNumber.
 void setPager(boolean b)
          Sets or resets the paging device flag of this PhoneNumber.
 void setPCS(boolean PCS)
          Sets or resets the PCS flag of this PhoneNumber.
 void setPreferred(boolean b)
          Sets or resets the preferred flag of this PhoneNumber.
 void setVideo(boolean b)
          Sets or resets the video conferencing flag of this PhoneNumber.
 void setVoice(boolean b)
          Sets or resets the voice flag of this PhoneNumber.
 void setWork(boolean b)
          Sets or resets the work flag of this PhoneNumber.
 
Methods inherited from class net.wimpi.pim.util.AbstractIdentifiable
equals, getUID, setUID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.wimpi.pim.util.Identifiable
getUID
 

Field Detail

m_Number

protected java.lang.String m_Number

m_Home

protected boolean m_Home

m_Work

protected boolean m_Work

m_Voice

protected boolean m_Voice

m_Fax

protected boolean m_Fax

m_Messaging

protected boolean m_Messaging

m_Cellular

protected boolean m_Cellular

m_Pager

protected boolean m_Pager

m_BBS

protected boolean m_BBS

m_MODEM

protected boolean m_MODEM

m_ISDN

protected boolean m_ISDN

m_Video

protected boolean m_Video

m_PCS

protected boolean m_PCS

m_Car

protected boolean m_Car

m_Preferred

protected boolean m_Preferred

m_Index

protected int m_Index
Constructor Detail

PhoneNumberImpl

public PhoneNumberImpl()
Method Detail

getIndex

public int getIndex()

setIndex

public void setIndex(int index)

getNumber

public java.lang.String getNumber()
Description copied from interface: PhoneNumber
Returns the number of this PhoneNumber.

Specified by:
getNumber in interface PhoneNumber
Returns:
the number as String.

setNumber

public void setNumber(java.lang.String number)
Description copied from interface: PhoneNumber
Sets the number of this PhoneNumber.

Specified by:
setNumber in interface PhoneNumber
Parameters:
number - the number as String.

isWork

public boolean isWork()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is associated with a place of work.

Specified by:
isWork in interface PhoneNumber
Returns:
true if associated with a place of work, false otherwise.

setWork

public void setWork(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the work flag of this PhoneNumber.

Specified by:
setWork in interface PhoneNumber
Parameters:
b - true if associated with a place of work, false otherwise.

isHome

public boolean isHome()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is associated with a residence.

Specified by:
isHome in interface PhoneNumber
Returns:
true if associated with a residence, false otherwise.

setHome

public void setHome(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the home flag of this PhoneNumber.

Specified by:
setHome in interface PhoneNumber
Parameters:
b - true if associated with a residence, false otherwise.

setVoice

public void setVoice(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the voice flag of this PhoneNumber.

Specified by:
setVoice in interface PhoneNumber
Parameters:
b - true if voice number, false otherwise.

isVoice

public boolean isVoice()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is a voice number.

Specified by:
isVoice in interface PhoneNumber
Returns:
true if voice number, false otherwise.

isVideo

public boolean isVideo()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is a video conferencing number.

Specified by:
isVideo in interface PhoneNumber
Returns:
true if video conferencing, false otherwise.

setVideo

public void setVideo(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the video conferencing flag of this PhoneNumber.

Specified by:
setVideo in interface PhoneNumber
Parameters:
b - true if video conferencing, false otherwise.

isFax

public boolean isFax()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is a facsimile number.

Specified by:
isFax in interface PhoneNumber
Returns:
true if facsimile, false otherwise.

setFax

public void setFax(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the fax flag of this PhoneNumber.

Specified by:
setFax in interface PhoneNumber
Parameters:
b - true if facsimile, false otherwise.

isMessaging

public boolean isMessaging()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber has voice messaging support.

Specified by:
isMessaging in interface PhoneNumber
Returns:
true if has messaging, false otherwise.

setMessaging

public void setMessaging(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the messaging flag of this PhoneNumber.

Specified by:
setMessaging in interface PhoneNumber
Parameters:
b - true if has messaging, false otherwise.

isCellular

public boolean isCellular()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is a cellular phone number.

Specified by:
isCellular in interface PhoneNumber
Returns:
true if cellular phone, false otherwise.

setCellular

public void setCellular(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the cellular flag of this PhoneNumber.

Specified by:
setCellular in interface PhoneNumber
Parameters:
b - true if cellular phone, false otherwise.

isPager

public boolean isPager()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is a paging device number.

Specified by:
isPager in interface PhoneNumber
Returns:
true if paging device number, false otherwise.

setPager

public void setPager(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the paging device flag of this PhoneNumber.

Specified by:
setPager in interface PhoneNumber
Parameters:
b - true if paging device number, false otherwise.

isBBS

public boolean isBBS()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is associated to a bulletin board system.

Specified by:
isBBS in interface PhoneNumber
Returns:
true if associated with a bbs, false otherwise.

setBBS

public void setBBS(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the bbs flag of this PhoneNumber.

Specified by:
setBBS in interface PhoneNumber
Parameters:
b - true if associated with a bbs, false otherwise.

isMODEM

public boolean isMODEM()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is connected with a MODEM.

Specified by:
isMODEM in interface PhoneNumber
Returns:
true if modem connected, false otherwise.

setMODEM

public void setMODEM(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the modem flag of this PhoneNumber.

Specified by:
setMODEM in interface PhoneNumber
Parameters:
b - true if modem connected, false otherwise.

isISDN

public boolean isISDN()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is associated with ISDN service.

Specified by:
isISDN in interface PhoneNumber
Returns:
true if ISDN service, false otherwise.

setISDN

public void setISDN(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the ISDN flag of this PhoneNumber.

Specified by:
setISDN in interface PhoneNumber
Parameters:
b - true if ISDN, false otherwise.

isPCS

public boolean isPCS()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is a personal communications services number.

Specified by:
isPCS in interface PhoneNumber
Returns:
true if PCS number, false otherwise.

setPCS

public void setPCS(boolean PCS)
Description copied from interface: PhoneNumber
Sets or resets the PCS flag of this PhoneNumber.

Specified by:
setPCS in interface PhoneNumber
Parameters:
PCS - true if PCS number, false otherwise.

isCar

public boolean isCar()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is a car phone number.

Specified by:
isCar in interface PhoneNumber
Returns:
true if car phone, false otherwise.

setCar

public void setCar(boolean car)
Description copied from interface: PhoneNumber
Sets or resets the car flag of this PhoneNumber.

Specified by:
setCar in interface PhoneNumber
Parameters:
car - true if car phone, false otherwise.

isType

public boolean isType(int TYPE)
Description copied from interface: PhoneNumber
Tests if this PhoneNumber is of a specific type. Types are defined as constants of this interface.

Specified by:
isType in interface PhoneNumber
Parameters:
TYPE - a type as int.

setPreferred

public void setPreferred(boolean b)
Description copied from interface: PhoneNumber
Sets or resets the preferred flag of this PhoneNumber.

Specified by:
setPreferred in interface PhoneNumber
Parameters:
b - true if representing a preferred number, false otherwise.

isPreferred

public boolean isPreferred()
Description copied from interface: PhoneNumber
Tests if this PhoneNumber represents a preferred number.

Specified by:
isPreferred in interface PhoneNumber
Returns:
true if representing a preferred number, false otherwise.


Copyright © 2001-2003 jpim team.