Skip navigation links

Oracle® Imaging and Process Management Java API Reference
11g Release 1 (11.1.1)

E12853-01


oracle.imaging
Class TypedValue

java.lang.Object
  extended by oracle.imaging.TypedValue

All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TypedValue>

public class TypedValue
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<TypedValue>
See Also:
Serialized Form

Field Summary
static int FIELD_VALUE_LENGTH
           

 

Constructor Summary
protected TypedValue()
          Protected default constructor.
  TypedValue(FieldType type, java.lang.Object value)
          Constructor with FieldType and value Object.
  TypedValue(java.lang.Object value)
          Constructor with value Object.

 

Method Summary
 int compareTo(TypedValue o)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
protected  java.lang.Comparable getComparableValue()
          Returns the value Object, which is also Comparable.
 java.lang.String getStringValue()
          Returns a string representation of the underlying value object.
 FieldType getType()
          Returns the field type.
 java.lang.Object getValue()
          Returns the value Object, which will be one of: Integer, BigDecimal, Long, or String.
 int hashCode()
          Returns a hash code value for the object.
 void setValue(java.lang.Object object)
          Sets the type, string value (for serialization/persistence), and the transient value object itself.
 java.lang.String toString()
          Returns the toString() result of the underlying value object.
static FieldType typeOfValue(java.lang.Object value)
          Returns the field type corresponding to value Object's class.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

FIELD_VALUE_LENGTH

public static final int FIELD_VALUE_LENGTH
See Also:
Constant Field Values

Constructor Detail

TypedValue

protected TypedValue()
Protected default constructor.

TypedValue

public TypedValue(java.lang.Object value)
Constructor with value Object. Use only if value is not null.
Parameters:
value -

TypedValue

public TypedValue(FieldType type,
                  java.lang.Object value)
Constructor with FieldType and value Object. Use if value may be null.

Method Detail

typeOfValue

public static FieldType typeOfValue(java.lang.Object value)
Returns the field type corresponding to value Object's class.
Parameters:
value -
Returns:

getStringValue

public java.lang.String getStringValue()
Returns a string representation of the underlying value object.
Returns:

getType

public FieldType getType()
Returns the field type.
Returns:

getValue

public java.lang.Object getValue()
Returns the value Object, which will be one of: Integer, BigDecimal, Long, or String.
Returns:
The typed value object or null.

getComparableValue

protected java.lang.Comparable getComparableValue()
Returns the value Object, which is also Comparable. It will be one of: Integer, BigDecimal, Long, or String. If this TypedValue instance is the result of deserialization, this lazily-creates the value object.
Returns:
The typed value object or null.
Throws:
java.lang.IllegalStateException - If the type has been changed to differ than the value's inherant type. This theoretically can only happen via reflection and/or a bad serialization state.

setValue

public void setValue(java.lang.Object object)
Sets the type, string value (for serialization/persistence), and the transient value object itself.
Parameters:
object - The new value object.
Throws:
java.lang.IllegalArgumentException - If the object cannot be used.

toString

public java.lang.String toString()
Returns the toString() result of the underlying value object.
Overrides:
toString in class java.lang.Object
Returns:

compareTo

public int compareTo(TypedValue o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Specified by:
compareTo in interface java.lang.Comparable<TypedValue>
Parameters:
o - the object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this object.

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
object - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

Skip navigation links

Oracle® Imaging and Process Management Java API Reference
11g Release 1 (11.1.1)

E12853-01


Copyright © 2010, Oracle. All rights reserved.