net.wimpi.pim.contact.model
Interface PhoneNumber

All Superinterfaces:
Identifiable, java.io.Serializable
All Known Implementing Classes:
PhoneNumberImpl

public interface PhoneNumber
extends Identifiable, java.io.Serializable

An interface modeling a phone number based on the types and information of the vCard Mime directory profile standard specification.

For reference see RFC 2426:
3.3.1 TEL Type Definition

The TEL type is based on the X.500 Telephone Number attribute.
Note that for a standard conformant implementation you have to observe that the default set flag is voice only.

Version:
0.1 (22/07/2003)
Author:
Dieter Wimberger

Field Summary
static int TYPE_BBS
          Type that indicates a bulletin board phone number.
static int TYPE_CAR
          Type that indicates a car phone number.
static int TYPE_CELLULAR
          Type that indicates a cellular phone number.
static int TYPE_FAX
          Type that indicates a facsimile phone number.
static int TYPE_HOME
          Type that indicates a phone number associated with a residence.
static int TYPE_ISDN
          Type that indicates an ISDN service number.
static int TYPE_MESSAGING
          Type that indicates that the phone number has messaging support.
static int TYPE_MODEM
          Type that indicates a modem connected phone number.
static int TYPE_PAGER
          Type that indicates a paging device phone number.
static int TYPE_PCS
          Type that indicates a personal communication services phone number.
static int TYPE_VIDEO
          Type that indicates a video conferencing phone number.
static int TYPE_VOICE
          Type that indicates a voice phone number.
static int TYPE_WORK
          Type that indicates a phone number associated with a work place.
 
Method Summary
 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 b)
          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 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 b)
          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 interface net.wimpi.pim.util.Identifiable
getUID
 

Field Detail

TYPE_WORK

public static final int TYPE_WORK
Type that indicates a phone number associated with a work place.

See Also:
Constant Field Values

TYPE_HOME

public static final int TYPE_HOME
Type that indicates a phone number associated with a residence.

See Also:
Constant Field Values

TYPE_FAX

public static final int TYPE_FAX
Type that indicates a facsimile phone number.

See Also:
Constant Field Values

TYPE_PAGER

public static final int TYPE_PAGER
Type that indicates a paging device phone number.

See Also:
Constant Field Values

TYPE_VOICE

public static final int TYPE_VOICE
Type that indicates a voice phone number.

See Also:
Constant Field Values

TYPE_BBS

public static final int TYPE_BBS
Type that indicates a bulletin board phone number.

See Also:
Constant Field Values

TYPE_MODEM

public static final int TYPE_MODEM
Type that indicates a modem connected phone number.

See Also:
Constant Field Values

TYPE_ISDN

public static final int TYPE_ISDN
Type that indicates an ISDN service number.

See Also:
Constant Field Values

TYPE_CELLULAR

public static final int TYPE_CELLULAR
Type that indicates a cellular phone number.

See Also:
Constant Field Values

TYPE_MESSAGING

public static final int TYPE_MESSAGING
Type that indicates that the phone number has messaging support.

See Also:
Constant Field Values

TYPE_VIDEO

public static final int TYPE_VIDEO
Type that indicates a video conferencing phone number.

See Also:
Constant Field Values

TYPE_CAR

public static final int TYPE_CAR
Type that indicates a car phone number.

See Also:
Constant Field Values

TYPE_PCS

public static final int TYPE_PCS
Type that indicates a personal communication services phone number.

See Also:
Constant Field Values
Method Detail

getNumber

public java.lang.String getNumber()
Returns the number of this PhoneNumber.

Returns:
the number as String.

setNumber

public void setNumber(java.lang.String number)
Sets the number of this PhoneNumber.

Parameters:
number - the number as String.

isPreferred

public boolean isPreferred()
Tests if this PhoneNumber represents a preferred number.

Returns:
true if representing a preferred number, false otherwise.

setPreferred

public void setPreferred(boolean b)
Sets or resets the preferred flag of this PhoneNumber.

Parameters:
b - true if representing a preferred number, false otherwise.

isHome

public boolean isHome()
Tests if this PhoneNumber is associated with a residence.

Returns:
true if associated with a residence, false otherwise.

setHome

public void setHome(boolean b)
Sets or resets the home flag of this PhoneNumber.

Parameters:
b - true if associated with a residence, false otherwise.

isWork

public boolean isWork()
Tests if this PhoneNumber is associated with a place of work.

Returns:
true if associated with a place of work, false otherwise.

setWork

public void setWork(boolean b)
Sets or resets the work flag of this PhoneNumber.

Parameters:
b - true if associated with a place of work, false otherwise.

isVoice

public boolean isVoice()
Tests if this PhoneNumber is a voice number.

Returns:
true if voice number, false otherwise.

setVoice

public void setVoice(boolean b)
Sets or resets the voice flag of this PhoneNumber.

Parameters:
b - true if voice number, false otherwise.

isMessaging

public boolean isMessaging()
Tests if this PhoneNumber has voice messaging support.

Returns:
true if has messaging, false otherwise.

setMessaging

public void setMessaging(boolean b)
Sets or resets the messaging flag of this PhoneNumber.

Parameters:
b - true if has messaging, false otherwise.

isFax

public boolean isFax()
Tests if this PhoneNumber is a facsimile number.

Returns:
true if facsimile, false otherwise.

setFax

public void setFax(boolean b)
Sets or resets the fax flag of this PhoneNumber.

Parameters:
b - true if facsimile, false otherwise.

isCellular

public boolean isCellular()
Tests if this PhoneNumber is a cellular phone number.

Returns:
true if cellular phone, false otherwise.

setCellular

public void setCellular(boolean b)
Sets or resets the cellular flag of this PhoneNumber.

Parameters:
b - true if cellular phone, false otherwise.

isVideo

public boolean isVideo()
Tests if this PhoneNumber is a video conferencing number.

Returns:
true if video conferencing, false otherwise.

setVideo

public void setVideo(boolean b)
Sets or resets the video conferencing flag of this PhoneNumber.

Parameters:
b - true if video conferencing, false otherwise.

isPager

public boolean isPager()
Tests if this PhoneNumber is a paging device number.

Returns:
true if paging device number, false otherwise.

setPager

public void setPager(boolean b)
Sets or resets the paging device flag of this PhoneNumber.

Parameters:
b - true if paging device number, false otherwise.

isBBS

public boolean isBBS()
Tests if this PhoneNumber is associated to a bulletin board system.

Returns:
true if associated with a bbs, false otherwise.

setBBS

public void setBBS(boolean b)
Sets or resets the bbs flag of this PhoneNumber.

Parameters:
b - true if associated with a bbs, false otherwise.

isMODEM

public boolean isMODEM()
Tests if this PhoneNumber is connected with a MODEM.

Returns:
true if modem connected, false otherwise.

setMODEM

public void setMODEM(boolean b)
Sets or resets the modem flag of this PhoneNumber.

Parameters:
b - true if modem connected, false otherwise.

isISDN

public boolean isISDN()
Tests if this PhoneNumber is associated with ISDN service.

Returns:
true if ISDN service, false otherwise.

setISDN

public void setISDN(boolean b)
Sets or resets the ISDN flag of this PhoneNumber.

Parameters:
b - true if ISDN, false otherwise.

isCar

public boolean isCar()
Tests if this PhoneNumber is a car phone number.

Returns:
true if car phone, false otherwise.

setCar

public void setCar(boolean b)
Sets or resets the car flag of this PhoneNumber.

Parameters:
b - true if car phone, false otherwise.

isPCS

public boolean isPCS()
Tests if this PhoneNumber is a personal communications services number.

Returns:
true if PCS number, false otherwise.

setPCS

public void setPCS(boolean b)
Sets or resets the PCS flag of this PhoneNumber.

Parameters:
b - true if PCS number, false otherwise.

isType

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

Parameters:
TYPE - a type as int.


Copyright © 2001-2003 jpim team.