NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sdp.fields
Class AttributeField

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sdp.fields.SDPObject
          extended by gov.nist.javax.sdp.fields.SDPField
              extended by gov.nist.javax.sdp.fields.AttributeField
All Implemented Interfaces:
SDPFieldNames, Serializable, Cloneable, Attribute, Field

public class AttributeField
extends SDPField
implements Attribute

Attribute Field.

Version:
JSR141-PUBLIC-REVIEW (subject to change).
Author:
Olivier Deruelle , M. Ranganathan
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface gov.nist.javax.sdp.fields.SDPFieldNames
ATTRIBUTE_FIELD, BANDWIDTH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, PROTO_VERSION_FIELD, REPEAT_FIELD, SESSION_NAME_FIELD, TIME_FIELD, URI_FIELD, ZONE_FIELD
 
Constructor Summary
AttributeField()
           
 
Method Summary
 Object clone()
          Clones this object.
 String encode()
          Get the string encoded version of this object
 boolean equals(Object that)
          An introspection based equality predicate for SDPObjects.
 gov.nist.core.NameValue getAttribute()
           
 String getName()
          Returns the name of this attribute
 String getValue()
          Returns the value of this attribute.
 boolean hasValue()
          Determines if this attribute has an associated value.
 void setAttribute(gov.nist.core.NameValue a)
          Set the attribute member
 void setName(String name)
          Sets the id of this attribute.
 void setValue(String value)
          Sets the value of this attribute.
 void setValueAllowNull(String value)
          Allow for null value when setting the value.
 String toString()
           
 
Methods inherited from class gov.nist.javax.sdp.fields.SDPField
getFieldName, getTypeChar
 
Methods inherited from class gov.nist.javax.sdp.fields.SDPObject
dbgPrint, debugDump, match
 
Methods inherited from class gov.nist.core.GenericObject
debugDump, encode, getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sdp.Field
getTypeChar
 

Constructor Detail

AttributeField

public AttributeField()
Method Detail

getAttribute

public gov.nist.core.NameValue getAttribute()

setAttribute

public void setAttribute(gov.nist.core.NameValue a)
Set the attribute member


encode

public String encode()
Get the string encoded version of this object

Specified by:
encode in class SDPField
Since:
v1.0

toString

public String toString()
Overrides:
toString in class SDPField

getName

public String getName()
               throws SdpParseException
Returns the name of this attribute

Specified by:
getName in interface Attribute
Returns:
a String identity or null.
Throws:
SdpParseException - if the name is not well formatted.

setName

public void setName(String name)
             throws SdpException
Sets the id of this attribute.

Specified by:
setName in interface Attribute
Parameters:
name - the string name/id of the attribute.
Throws:
SdpException - if the name is null

hasValue

public boolean hasValue()
                 throws SdpParseException
Determines if this attribute has an associated value.

Specified by:
hasValue in interface Attribute
Returns:
true if the attribute has a value.
Throws:
SdpParseException - if the value is not well formatted.

getValue

public String getValue()
                throws SdpParseException
Returns the value of this attribute.

Specified by:
getValue in interface Attribute
Returns:
the value; null if the attribute has no associated value.
Throws:
SdpParseException - if the value is not well formatted.

setValue

public void setValue(String value)
              throws SdpException
Sets the value of this attribute.

Specified by:
setValue in interface Attribute
Parameters:
value - the - attribute value
Throws:
SdpException - if the value is null.

setValueAllowNull

public void setValueAllowNull(String value)
Allow for null value when setting the value.

Parameters:
value - -- can be null.

clone

public Object clone()
Description copied from class: gov.nist.core.GenericObject
Clones this object.

Specified by:
clone in interface Field
Overrides:
clone in class gov.nist.core.GenericObject
Returns:
a clone of this field.

equals

public boolean equals(Object that)
Description copied from class: SDPObject
An introspection based equality predicate for SDPObjects.

Overrides:
equals in class SDPObject
Parameters:
that - is the other object to test against.
Returns:
true if the objects are equal.

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.