util
Class Value

java.lang.Object
  |
  +--util.Value
Direct Known Subclasses:
Need, UncertainValue

public class Value
extends Object
implements Serializable, Cloneable

This class is useful if you deal with a situation where you are likely to be dealing with objects or primitives. It's equals method does equals only on the actual contained value and it is overloaded to deal with all supported primitive types.

See Also:
Serializable, Serialized Form

Field Summary
protected  Object value
           
 
Constructor Summary
Value()
           
Value(boolean value)
           
Value(float value)
           
Value(int value)
           
Value(Object value)
           
 
Method Summary
 Object clone()
           
 boolean equals(boolean b)
           
 boolean equals(float f)
           
 boolean equals(int i)
           
 boolean equals(Object o)
          Does equal only on the value object -- perhaps this is not correct but you will be able to treat this almost as if you were dealing with the value itself when you are dealing with this proxy object
 boolean getBooleanValue()
           
 int getIntValue()
           
 String getStringValue()
          Returns whatever value it has cast to string
 Object getValue()
           
 void setValue(boolean v)
           
 void setValue(int v)
           
 void setValue(Object o)
           
 String toString()
           
 boolean valueEquals(Object o)
           
protected  void valueModified()
          This method is in here in case any of the children of this class ever tried to be a bean or something and needed to perform some action when value gets modified.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected Object value
Constructor Detail

Value

public Value()

Value

public Value(Object value)

Value

public Value(boolean value)

Value

public Value(int value)

Value

public Value(float value)
Method Detail

getValue

public Object getValue()

getStringValue

public String getStringValue()
Returns whatever value it has cast to string

getBooleanValue

public boolean getBooleanValue()

getIntValue

public int getIntValue()

setValue

public void setValue(Object o)

setValue

public void setValue(int v)

setValue

public void setValue(boolean v)

valueModified

protected void valueModified()
This method is in here in case any of the children of this class ever tried to be a bean or something and needed to perform some action when value gets modified. Here this method does nothing.

equals

public boolean equals(Object o)
Does equal only on the value object -- perhaps this is not correct but you will be able to treat this almost as if you were dealing with the value itself when you are dealing with this proxy object
Overrides:
equals in class Object
Parameters:
o - an Object value
Returns:
a boolean value

valueEquals

public boolean valueEquals(Object o)

equals

public boolean equals(int i)

equals

public boolean equals(float f)

equals

public boolean equals(boolean b)

clone

public Object clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object