|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.primix.tapestry.binding.AbstractBinding
Base class for IBinding
implementations.
Constructor Summary | |
AbstractBinding()
|
Method Summary | |
boolean |
getBoolean()
Cooerces the raw value into a true or false, according to the rules set by Tapestry.evaluateBoolean(Object) . |
double |
getDouble()
Gets the value of the Binding using IBinding.getObject() and coerces it
to a double . |
int |
getInt()
Gets the value of the Binding using getObject(java.lang.String, java.lang.Class) and coerces it
to an int . |
java.lang.Object |
getObject(java.lang.String parameterName,
java.lang.Class type)
Returns the value for the binding after performing some basic checks. |
java.lang.String |
getString()
Gets the value for the binding. |
boolean |
isStatic()
Default implementation: returns true. |
void |
setBoolean(boolean value)
Constructs a Boolean and invokes setObject(Object) . |
void |
setDouble(double value)
Constructs an Double and invokes setObject(Object) . |
void |
setInt(int value)
Constructs an Integer and invokes setObject(Object) . |
void |
setObject(java.lang.Object value)
Updates the value of the binding, if possible. |
void |
setString(java.lang.String value)
Invokes setObject(Object) . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.primix.tapestry.IBinding |
getObject, getType |
Constructor Detail |
public AbstractBinding()
Method Detail |
public boolean getBoolean()
Tapestry.evaluateBoolean(Object)
.getBoolean
in interface IBinding
public int getInt()
IBinding
IBinding.getObject()
and coerces it
to an int
. Strings will be parsed, and other
java.lang.Number
classes will have intValue()
invoked.getInt
in interface IBinding
com.primix.tapestry.IBinding
ClassCastException
- if the binding's value is not of a usable class.NullValueForBindingException
- if the binding's value is null.public double getDouble()
IBinding
IBinding.getObject()
and coerces it
to a double
. Strings will be parsed, and other
java.lang.Number
classes will have doubleValue()
invoked.getDouble
in interface IBinding
com.primix.tapestry.IBinding
ClassCastException
- if the binding's value is not of a usable class.NullValueForBindingException
- if the binding's value is null.public java.lang.String getString()
toString()
) version of
the value.getString
in interface IBinding
public void setBoolean(boolean value)
IBinding
Boolean
and invokes IBinding.setObject(Object)
.setBoolean
in interface IBinding
ReadOnlyBindingException
- always.public void setInt(int value)
IBinding
Integer
and invokes IBinding.setObject(Object)
.setInt
in interface IBinding
ReadOnlyBindingException
- always.public void setDouble(double value)
IBinding
Double
and invokes IBinding.setObject(Object)
.setDouble
in interface IBinding
ReadOnlyBindingException
- always.public void setString(java.lang.String value)
IBinding
IBinding.setObject(Object)
.setString
in interface IBinding
ReadOnlyBindingException
- always.public void setObject(java.lang.Object value)
IBinding
setObject
in interface IBinding
ReadOnlyBindingException
- always.public boolean isStatic()
isStatic
in interface IBinding
public java.lang.Object getObject(java.lang.String parameterName, java.lang.Class type)
IBinding
getObject
in interface IBinding
com.primix.tapestry.IBinding
parameterName
- the name of the parameter (used to build
the message if an exception is thrown).type
- if not null, the value must be assignable to the specific
classBindingException
- if the value is not assignable to the
specified type
a
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |