org.nodal.model
Interface Setter

All Superinterfaces:
Getter, TxnMonitorable
All Known Implementing Classes:
AtomicSetterUtil, SetterFilter, SetterUtil

public interface Setter
extends Getter

Encapsulation of the modification of a value. Access to this interface allows one to set a value somewhere in the NODAL data system. Moreover, since it is also an extension of the Getter interface, we can query those values and request notification of changes to a value.


Method Summary
 java.lang.Object set(java.lang.Object val)
          Set the value to an Object.
 boolean setBoolean(boolean b)
          Set the value to true/false.
 byte setByte(byte b)
          Set the value to a byte.
 char setChar(char c)
          Set the value to a character.
 double setDouble(double d)
          Set the value to a double precision floating point value.
 float setFloat(float f)
          Set the value to a single precision floating point value.
 int setInt(int i)
          Set the value to an integer.
 Node setNode(Node n)
          Set the value to a Node.
 short setShort(short s)
          Set the value to a short integer..
 java.lang.String setString(java.lang.String s)
          Set the value to that parsed from a String.
 
Methods inherited from interface org.nodal.model.Getter
get, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getNode, getShort, getString, path, type, valueEquals
 
Methods inherited from interface org.nodal.model.TxnMonitorable
addTxnHandler, removeTxnHandler
 

Method Detail

set

public java.lang.Object set(java.lang.Object val)
                     throws ConstraintFailure
Set the value to an Object. Will call setString or setNode if appropriate.

Parameters:
val - the new value for the slot
Returns:
the Object that was Set
Throws:
ConstraintFailure

setString

public java.lang.String setString(java.lang.String s)
                           throws ConstraintFailure
Set the value to that parsed from a String.

Parameters:
s - a String representing the new value for the slot
Returns:
the String as set
Throws:
ConstraintFailure

setNode

public Node setNode(Node n)
             throws ConstraintFailure
Set the value to a Node. The Node returned should have a Path that reflects its new position in the NODAL hierarchy.

Parameters:
n - the new Node value for the slot
Returns:
a Node reference with Path defined by the Setter context
Throws:
ConstraintFailure

setBoolean

public boolean setBoolean(boolean b)
                   throws ConstraintFailure
Set the value to true/false.

Parameters:
b - the new boolean value
Returns:
the value as set
Throws:
ConstraintFailure

setChar

public char setChar(char c)
             throws ConstraintFailure
Set the value to a character.

Parameters:
c - the new character value
Returns:
the value as set
Throws:
ConstraintFailure

setByte

public byte setByte(byte b)
             throws ConstraintFailure
Set the value to a byte.

Parameters:
b - the new byte value
Returns:
the value as set
Throws:
ConstraintFailure

setShort

public short setShort(short s)
               throws ConstraintFailure
Set the value to a short integer..

Parameters:
s - the new short value
Returns:
the value as set
Throws:
ConstraintFailure

setInt

public int setInt(int i)
           throws ConstraintFailure
Set the value to an integer.

Parameters:
i - the new integer value
Returns:
the value as set
Throws:
ConstraintFailure

setFloat

public float setFloat(float f)
               throws ConstraintFailure
Set the value to a single precision floating point value.

Parameters:
f - the new float value
Returns:
the value as set
Throws:
ConstraintFailure

setDouble

public double setDouble(double d)
                 throws ConstraintFailure
Set the value to a double precision floating point value.

Parameters:
d - the new double value
Returns:
the value as set
Throws:
ConstraintFailure