Methods Summary |
---|
public java.lang.Object | clone()Copies the current instance.
PhoneField retval = new PhoneField();
retval.name = this.name;
retval.phoneNumber = this.phoneNumber;
return retval;
|
public java.lang.String | encode()Gets the string encoded version of this object.
Here, we implement only the "name <phoneNumber>" form
and not the "phoneNumber (name)" form
String encoded_string;
encoded_string = PHONE_FIELD;
if (name != null) {
encoded_string += name + Separators.LESS_THAN;
}
encoded_string += phoneNumber;
if (name != null) {
encoded_string += Separators.GREATER_THAN;
}
encoded_string += Separators.NEWLINE;
return encoded_string;
|
public java.lang.String | getName()Gets the name field.
return name;
|
public java.lang.String | getPhoneNumber()Gets the phone number.
return phoneNumber;
|
public java.lang.String | getValue()Returns the value.
return getName();
|
public void | setName(java.lang.String name)Sets the name member.
this.name = name;
|
public void | setPhoneNumber(java.lang.String phoneNumber)Sets the phone number member.
this.phoneNumber = phoneNumber;
|
public void | setValue(java.lang.String value)Sets the value.
if (value == null)
throw new SdpException("The value parameter is null");
else setName(value);
|