org.nodal.util
Class GetterFilter

java.lang.Object
  extended byorg.nodal.util.GetterFilter
All Implemented Interfaces:
Getter, TxnMonitorable
Direct Known Subclasses:
AtomicSetterUtil, SetterFilter, SetterUtil

public class GetterFilter
extends java.lang.Object
implements Getter


Field Summary
protected  Getter getter
           
 
Constructor Summary
protected GetterFilter(Getter g)
           
 
Method Summary
 void addTxnHandler(TxnHandler handler)
          Add a TxnHandler to be invoked when this object changes.
 java.lang.Object get()
          Obtain the current value of the resource as an Object.
 boolean getBoolean()
          Obtain a boolean depiction of the current value of the resource if possible.
 byte getByte()
          Obtain a byte depiction of the current value of the resource if possible.
 char getChar()
          Obtain a char depiction of the current value of the resource if possible.
 double getDouble()
          Obtain a double depiction of the current value of the resource if possible.
 float getFloat()
          Obtain a float depiction of the current value of the resource if possible.
 int getInt()
          Obtain an int depiction of the current value of the resource if possible.
 long getLong()
          Obtain a long depiction of the current value of the resource if possible.
 Node getNode()
          Obtain a Node interface for the current value of the resource.
 short getShort()
          Obtain a short depiction of the current value of the resource if possible.
 java.lang.String getString()
          Obtain a String depiction of the current value of the resource.
 Path path()
          A Path to this Getter.
 void removeTxnHandler(TxnHandler handler)
          Remove a previously added TxnHandler.
 Type type()
          The type of the value returned by this Getter.
 boolean valueEquals(java.lang.Object v)
          Check equality of the value that would be returned against the argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

getter

protected Getter getter
Constructor Detail

GetterFilter

protected GetterFilter(Getter g)
Method Detail

path

public Path path()
Description copied from interface: Getter
A Path to this Getter. For a Getter that is Node.Property, the Path is normally the Node.path() extended with the property name.

Specified by:
path in interface Getter
Returns:
a bound Path that accesses this Getter

type

public Type type()
Description copied from interface: Getter
The type of the value returned by this Getter.

Specified by:
type in interface Getter
Returns:
the Type of value returned by a get() call

get

public java.lang.Object get()
                     throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain the current value of the resource as an Object.

Specified by:
get in interface Getter
Throws:
PropertyConstraintFailure

getString

public java.lang.String getString()
                           throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a String depiction of the current value of the resource.

Specified by:
getString in interface Getter
Throws:
PropertyConstraintFailure

getNode

public Node getNode()
             throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a Node interface for the current value of the resource.

Specified by:
getNode in interface Getter
Throws:
PropertyConstraintFailure

getBoolean

public boolean getBoolean()
                   throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a boolean depiction of the current value of the resource if possible.

Specified by:
getBoolean in interface Getter
Throws:
PropertyConstraintFailure

getChar

public char getChar()
             throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a char depiction of the current value of the resource if possible.

Specified by:
getChar in interface Getter
Throws:
PropertyConstraintFailure

getByte

public byte getByte()
             throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a byte depiction of the current value of the resource if possible.

Specified by:
getByte in interface Getter
Throws:
PropertyConstraintFailure

getShort

public short getShort()
               throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a short depiction of the current value of the resource if possible.

Specified by:
getShort in interface Getter
Throws:
PropertyConstraintFailure

getInt

public int getInt()
           throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain an int depiction of the current value of the resource if possible.

Specified by:
getInt in interface Getter
Throws:
PropertyConstraintFailure

getLong

public long getLong()
             throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a long depiction of the current value of the resource if possible.

Specified by:
getLong in interface Getter
Throws:
PropertyConstraintFailure

getFloat

public float getFloat()
               throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a float depiction of the current value of the resource if possible.

Specified by:
getFloat in interface Getter
Throws:
PropertyConstraintFailure

getDouble

public double getDouble()
                 throws PropertyConstraintFailure
Description copied from interface: Getter
Obtain a double depiction of the current value of the resource if possible.

Specified by:
getDouble in interface Getter
Throws:
PropertyConstraintFailure

valueEquals

public boolean valueEquals(java.lang.Object v)
                    throws PropertyConstraintFailure
Description copied from interface: Getter

Check equality of the value that would be returned against the argument.

This is especially useful to avoid extraneous copies when we only need to test equality.

Specified by:
valueEquals in interface Getter
Throws:
PropertyConstraintFailure

addTxnHandler

public void addTxnHandler(TxnHandler handler)
Description copied from interface: TxnMonitorable
Add a TxnHandler to be invoked when this object changes.

Specified by:
addTxnHandler in interface TxnMonitorable
Parameters:
handler - a TxnHandler whose notify methods will be invoked when this object changes.

removeTxnHandler

public void removeTxnHandler(TxnHandler handler)
Description copied from interface: TxnMonitorable
Remove a previously added TxnHandler.

Specified by:
removeTxnHandler in interface TxnMonitorable
Parameters:
handler - a TxnHandler that has previously been added.