|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A NODAL data type.
A data type in NODAL is represented by an instance of Type, and each such instance represents an ability to check for the type validity of various potential inputs (via the accepts methods), and an ability to convert to an acceptable type (via the as methods).
Method Summary | |
boolean |
accepts(boolean b)
Check that this type accepts the boolean value. |
boolean |
accepts(byte b)
Check that this type accepts the byte value. |
boolean |
accepts(char c)
Check that this type accepts the char value. |
boolean |
accepts(double d)
Check that this type accepts the double value. |
boolean |
accepts(float s)
Check that this type accepts the float value. |
boolean |
accepts(int i)
Check that this type accepts the int value. |
boolean |
accepts(long l)
Check that this type accepts the long value. |
boolean |
accepts(java.lang.Object v)
Check that this type accepts the Object. |
boolean |
accepts(short s)
Check that this type accepts the short value. |
boolean |
acceptsNode(Node n)
Check that this type accepts the Node. |
boolean |
acceptsString(java.lang.String s)
Check that this type accepts the String. |
boolean |
acceptsType(Type t)
Check that this type accepts a value with the given Type. |
java.lang.Object |
from(boolean b)
Convert a boolean value to this Type (if possible). |
java.lang.Object |
from(byte b)
Convert a byte value to this Type (if possible). |
java.lang.Object |
from(char c)
Convert a char value to this Type (if possible). |
java.lang.Object |
from(double d)
Convert a double value to this Type (if possible). |
java.lang.Object |
from(float f)
Convert a float value to this Type (if possible). |
java.lang.Object |
from(int i)
Convert an int value to this Type (if possible). |
java.lang.Object |
from(long l)
Convert a long value to this Type (if possible). |
java.lang.Object |
from(java.lang.Object v)
Convert an Object to this Type (if possible). |
java.lang.Object |
from(short s)
Convert a short value to this Type (if possible). |
java.lang.Object |
fromNode(Node n)
Convert a Node to this Type (if possible). |
java.lang.Object |
fromString(java.lang.String s)
Convert a String to this Type (if possible). |
boolean |
isNodeType()
Is this a NodeType? |
Type |
type()
The base Type associated with this interface. |
Methods inherited from interface org.nodal.util.Nameable |
name, setName |
Method Detail |
public Type type()
Interfaces that extend the Type interface should override this method to refer back to the Type from which they are derived.
TypeFilter
,
NodeType.Editor
public boolean accepts(boolean b)
public boolean accepts(char c)
public boolean accepts(byte b)
public boolean accepts(short s)
public boolean accepts(int i)
public boolean accepts(long l)
public boolean accepts(float s)
public boolean accepts(double d)
public boolean acceptsString(java.lang.String s)
public boolean acceptsNode(Node n)
public boolean accepts(java.lang.Object v)
public boolean acceptsType(Type t)
This is a much more specific test than the
value-based accepts
tests, since it returns true
only if all values of the parameter type are accepted by
this Type
. As such, this function tests a strict
sub-type relationship.
public java.lang.Object from(boolean b)
public java.lang.Object from(char c)
public java.lang.Object from(byte b)
public java.lang.Object from(short s)
public java.lang.Object from(int i)
public java.lang.Object from(long l)
public java.lang.Object from(float f)
public java.lang.Object from(double d)
public java.lang.Object fromString(java.lang.String s)
public java.lang.Object fromNode(Node n)
public java.lang.Object from(java.lang.Object v)
public boolean isNodeType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |