com.thaiopensource.datatype.xsd
Class BinaryDatatype

java.lang.Object
  extended by com.thaiopensource.datatype.xsd.DatatypeBase
      extended by com.thaiopensource.datatype.xsd.BinaryDatatype
All Implemented Interfaces:
Datatype2, Measure, Datatype
Direct Known Subclasses:
Base64BinaryDatatype, HexBinaryDatatype

abstract class BinaryDatatype
extends DatatypeBase
implements Measure


Field Summary
 
Fields inherited from class com.thaiopensource.datatype.xsd.DatatypeBase
WHITE_SPACE_COLLAPSE, WHITE_SPACE_PRESERVE, WHITE_SPACE_REPLACE
 
Fields inherited from interface org.relaxng.datatype.Datatype
ID_TYPE_ID, ID_TYPE_IDREF, ID_TYPE_IDREFS, ID_TYPE_NULL
 
Constructor Summary
BinaryDatatype()
           
 
Method Summary
 int getLength(Object obj)
           
(package private)  Measure getMeasure()
           
 boolean sameValue(Object value1, Object value2)
          Tests the equality of two value objects which were originally created by the createValue method of this object.
 int valueHashCode(Object value)
          Computes the hash code for a value object, which is consistent with the sameValue method.
 
Methods inherited from class com.thaiopensource.datatype.xsd.DatatypeBase
allowsValue, alwaysValid, checkValid, createStreamingValidator, createValue, getIdType, getOrderRelation, getPrimitive, getValue, getWhiteSpace, isContextDependent, isValid, lexicallyAllows, normalizeWhiteSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryDatatype

BinaryDatatype()
Method Detail

valueHashCode

public int valueHashCode(Object value)
Description copied from interface: Datatype
Computes the hash code for a value object, which is consistent with the sameValue method.

Specified by:
valueHashCode in interface Datatype
Overrides:
valueHashCode in class DatatypeBase
Returns:
hash code for the specified value object.

sameValue

public boolean sameValue(Object value1,
                         Object value2)
Description copied from interface: Datatype
Tests the equality of two value objects which were originally created by the createValue method of this object. The behavior is undefined if objects not created by this type are passed. It is the caller's responsibility to ensure that value objects belong to this type.

Specified by:
sameValue in interface Datatype
Overrides:
sameValue in class DatatypeBase
Returns:
true if two value objects are considered equal according to the definition of this datatype; false if otherwise.

getLength

public int getLength(Object obj)
Specified by:
getLength in interface Measure

getMeasure

Measure getMeasure()
Overrides:
getMeasure in class DatatypeBase