com.cafesoft.cams.attr
Class StringAttributeValue

java.lang.Object
  extended by com.cafesoft.cams.attr.AbstractAttributeValue
      extended by com.cafesoft.cams.attr.StringAttributeValue
All Implemented Interfaces:
AttributeValue, Evaluatable

public class StringAttributeValue
extends AbstractAttributeValue

StringAttributeValue represents an attribute value of type: urn:cams:1.0:names:data-type:string.

Since:
4/16/2004

Field Summary
static String DATA_TYPE_ID
          Official Cams data type identifer of this type
 
Constructor Summary
StringAttributeValue(String value)
          Creates a new StringAttributeValue that represents the supplied String value.
 
Method Summary
 String encode()
          Returns the String encoding of the attribute value.
 boolean equals(Object o)
          Returns true if the input is an instance of this class and if its value equals the value contained in this class.
 String getValue()
          Returns the String value represented by this object.
 int hashCode()
          Returns the hashcode value used to index and compare this object with others of the same type.
 String toString()
          Converts to a String representation.
 
Methods inherited from class com.cafesoft.cams.attr.AbstractAttributeValue
evaluate, evaluatesToBag, getType, isBag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_TYPE_ID

public static final String DATA_TYPE_ID
Official Cams data type identifer of this type

See Also:
Constant Field Values
Constructor Detail

StringAttributeValue

public StringAttributeValue(String value)
Creates a new StringAttributeValue that represents the supplied String value.

Parameters:
value - the String value to be represented by by this attribute.
Method Detail

getValue

public String getValue()
Returns the String value represented by this object.

Returns:
the String value

equals

public boolean equals(Object o)
Returns true if the input is an instance of this class and if its value equals the value contained in this class.

Overrides:
equals in class Object
Parameters:
o - the object to compare
Returns:
true if this object and the input represent the same value

hashCode

public int hashCode()
Returns the hashcode value used to index and compare this object with others of the same type. Typically this is the hashcode of the backing data object.

Overrides:
hashCode in class Object
Returns:
the object's hashcode value

toString

public String toString()
Converts to a String representation.

Overrides:
toString in class Object
Returns:
the String representation of this attribute.

encode

public String encode()
Returns the String encoding of the attribute value.

Specified by:
encode in interface AttributeValue
Specified by:
encode in class AbstractAttributeValue
Returns:
a String form of the value


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.