Package sleep.engine.types
Class NullValue
- java.lang.Object
-
- sleep.engine.types.NullValue
-
- All Implemented Interfaces:
java.io.Serializable
,ScalarType
public class NullValue extends java.lang.Object implements ScalarType
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NullValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalarType
copyValue()
create a clone of this scalar's value.double
doubleValue()
convert the scalar to a doublejava.lang.Class
getType()
returns the Class type of this ScalarType.int
intValue()
convert the scalar to an intlong
longValue()
convert the scalar to a longjava.lang.Object
objectValue()
convert the scalar to an object value *shrug*java.lang.String
toString()
convert the scalar to a string
-
-
-
Method Detail
-
copyValue
public ScalarType copyValue()
Description copied from interface:ScalarType
create a clone of this scalar's value. It is important to note that you should return a copy here unless you really want scalars of your scalar type to be passed by reference.- Specified by:
copyValue
in interfaceScalarType
-
intValue
public int intValue()
Description copied from interface:ScalarType
convert the scalar to an int- Specified by:
intValue
in interfaceScalarType
-
longValue
public long longValue()
Description copied from interface:ScalarType
convert the scalar to a long- Specified by:
longValue
in interfaceScalarType
-
doubleValue
public double doubleValue()
Description copied from interface:ScalarType
convert the scalar to a double- Specified by:
doubleValue
in interfaceScalarType
-
toString
public java.lang.String toString()
Description copied from interface:ScalarType
convert the scalar to a string- Specified by:
toString
in interfaceScalarType
- Overrides:
toString
in classjava.lang.Object
-
objectValue
public java.lang.Object objectValue()
Description copied from interface:ScalarType
convert the scalar to an object value *shrug*- Specified by:
objectValue
in interfaceScalarType
-
getType
public java.lang.Class getType()
Description copied from interface:ScalarType
returns the Class type of this ScalarType. Use this instead of getClass to allow other functions to wrap ScalarType's without breaking functionality- Specified by:
getType
in interfaceScalarType
-
-