Methods Summary |
---|
public java.lang.Object | clone()Copies the current instance.
KeyField retval = new KeyField();
retval.type = type;
retval.keyData = keyData;
return retval;
|
public java.lang.String | encode()Gets the string encoded version of this object.
String encoded_string;
encoded_string = KEY_FIELD + type;
if (Utils.compareToIgnoreCase(type, SDPKeywords.PROMPT) == 0) {
if (Utils.compareToIgnoreCase(type, SDPKeywords.URI) == 0) {
encoded_string += Separators.COLON;
encoded_string += keyData;
} else {
if (keyData != null) {
encoded_string += Separators.COLON;
encoded_string += keyData;
}
}
}
encoded_string += Separators.NEWLINE;
return encoded_string;
|
public java.lang.String | getKey()Returns the value of this attribute.
return getKeyData();
|
public java.lang.String | getKeyData()Gets the key data.
return keyData;
|
public java.lang.String | getMethod()Returns the name of this attribute.
return this.type;
|
public java.lang.String | getType()Gets the type member. return type;
|
public boolean | hasKey()Determines if this attribute has an associated value.
String key = getKeyData();
return key != null;
|
public void | setKey(java.lang.String key)Sets the value of this attribute.
if (key == null)
throw new SdpException("The key is null");
else setKeyData(key);
|
public void | setKeyData(java.lang.String k)Sets the key data member.
keyData = k;
|
public void | setMethod(java.lang.String name)Sets the id of this attribute.
this.type = name;
|
public void | setType(java.lang.String t)Sets the type member.
type = t;
|