com.cafesoft.cams.attr
Class BooleanAttributeValue

java.lang.Object
  |
  +--com.cafesoft.cams.attr.AbstractAttributeValue
        |
        +--com.cafesoft.cams.attr.BooleanAttributeValue
All Implemented Interfaces:
AttributeValue, Evaluatable

public class BooleanAttributeValue
extends AbstractAttributeValue

BooleanAttributeValue represents an attribute value of type: urn:cams:1.0:names:data-type:boolean.

Since:
4/16/2004

Field Summary
static BooleanAttributeValue BOOLEAN_ATTRIBUTE_VALUE_FALSE
          False BooleanAttributeValue
static BooleanAttributeValue BOOLEAN_ATTRIBUTE_VALUE_TRUE
          True BooleanAttributeValue
static String DATA_TYPE_ID
          Official Cams identifier of this type
 
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.
static BooleanAttributeValue getInstance(boolean value)
          Get a BooleanAttributeValue instance.
 boolean getValue()
          Returns the boolean 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 identifier of this type

See Also:
Constant Field Values

BOOLEAN_ATTRIBUTE_VALUE_TRUE

public static final BooleanAttributeValue BOOLEAN_ATTRIBUTE_VALUE_TRUE
True BooleanAttributeValue


BOOLEAN_ATTRIBUTE_VALUE_FALSE

public static final BooleanAttributeValue BOOLEAN_ATTRIBUTE_VALUE_FALSE
False BooleanAttributeValue

Method Detail

getInstance

public static BooleanAttributeValue getInstance(boolean value)
Get a BooleanAttributeValue instance.

Parameters:
value - the boolean value for which a BooleanAttributeValue is desired.
Returns:
the BooleanAttributeValue instance.

getValue

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

Returns:
the boolean 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 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.