Vordel SDK

com.vordel.es
Class Value

java.lang.Object
  extended by com.vordel.es.Value

public class Value
extends java.lang.Object

A Value can represent either a data value (in the form of a String), or a reference to some Entity (in the form of an ESPK).


Constructor Summary
Value()
          Default Constructor.
Value(ESPK r)
          Constructor to set the reference component of this value
Value(java.lang.String d)
          Constructor to set the String component of the value
 
Method Summary
 Value cloneValue()
           
 boolean equals(java.lang.Object val)
          Returns true if two Value objects are equal.
 java.lang.String getData()
          Get the intrinsic value of the Value object as a data value
 ESPK getRef()
          Get the intrinsic value of the Value object as a reference
 int hashCode()
          Hashcode of the underlying String or ESPK depending on type of Value.
 boolean hasValue()
          Determine if this Value has at least one underlying data value set.
 boolean isNull()
          A null value is one whose data and value are both unset
 java.lang.String toString()
          Convienence method for debugging
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Value

public Value()
Default Constructor. The value is considered 'null'


Value

public Value(java.lang.String d)
Constructor to set the String component of the value

Parameters:
d - The data to store in this Value object

Value

public Value(ESPK r)
Constructor to set the reference component of this value

Parameters:
r - The reference to store in this Value object
Method Detail

cloneValue

public Value cloneValue()

getRef

public final ESPK getRef()
Get the intrinsic value of the Value object as a reference

Returns:
The reference, or null if not set

getData

public final java.lang.String getData()
Get the intrinsic value of the Value object as a data value

Returns:
The data, or null if not set

equals

public final boolean equals(java.lang.Object val)
Returns true if two Value objects are equal. To determine equality, we check the reference components of the Value first. If they are both set and the PKs are equal, then return true. Otherwise, check the string component of the Value for equality.

Overrides:
equals in class java.lang.Object
Parameters:
val - The other Value to compare to
Returns:
True if equal, false otherwise

isNull

public boolean isNull()
A null value is one whose data and value are both unset

Returns:
False if both data and reference are unset, true otherwise

hasValue

public boolean hasValue()
Determine if this Value has at least one underlying data value set.

Returns:
true if any data value is non-null, false otherwise.

toString

public final java.lang.String toString()
Convienence method for debugging

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the value

hashCode

public final int hashCode()
Hashcode of the underlying String or ESPK depending on type of Value.

Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode

Vordel SDK


This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel