|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface makes it possible to create a new scalar type. A scalar type is responsible for being able to convert itself to any type of scalar value.
To store a custom scalar type in a scalar:
Scalar temp = SleepUtils.getScalar(); // returns an empty scalar. temp.setValue(new MyScalarType());
In the above example MyScalarType is an instance that implements the ScalarType interface.
Method Summary | |
ScalarType |
copyValue()
create a clone of this scalar's value. |
double |
doubleValue()
convert the scalar to a double |
int |
intValue()
convert the scalar to an int |
long |
longValue()
convert the scalar to a long |
Object |
objectValue()
convert the scalar to an object value *shrug* |
String |
toString()
convert the scalar to a string |
Method Detail |
public ScalarType copyValue()
public int intValue()
public long longValue()
public double doubleValue()
public String toString()
public Object objectValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |