org.eclipse.smila.datamodel
Interface Value
- All Superinterfaces:
- Any, java.lang.Iterable<Any>
- All Known Implementing Classes:
- ValueImpl
public interface Value
- extends Any
Interface for a value object, used if the any object is of type string, double, boolean, long, date or date time.
- Author:
- cind01
| Nested classes/interfaces inherited from interface org.eclipse.smila.datamodel.Any |
Any.ValueType |
| Methods inherited from interface org.eclipse.smila.datamodel.Any |
asMap, asSeq, asValue, getFactory, getValueType, isBoolean, isDate, isDateTime, isDouble, isEmpty, isLong, isMap, isNumber, isSeq, isString, isValue, iterator, size |
asString
java.lang.String asString()
- Returns:
- The string representation
asDouble
java.lang.Double asDouble()
- Returns:
- The double representation, an InvalidValueTypeException is thrown if the value is not a number. If value is
a string then this is tried to be converted to a Double.
asLong
java.lang.Long asLong()
- Returns:
- The long representation, an InvalidValueTypeException is thrown if the value is not a number. If value is a
string then this is tried to be converted to a Long.
asBoolean
java.lang.Boolean asBoolean()
- Returns:
- The boolean representation, an InvalidValueTypeException is thrown if the value is not of type boolean. If
value is a string then this is tried to be converted to a boolean.
asDate
java.util.Date asDate()
- Returns:
- The date representation, an InvalidValueTypeException is thrown if the value is not of type date or
datetime. If value is a string then this is tried to be converted to a date.
asDateTime
java.util.Date asDateTime()
- Returns:
- The date time representation, an InvalidValueTypeException is thrown if the value is not of type datetime.
If value is a string then this is tried to be converted to a datetime.
getObject
java.lang.Object getObject()
- Returns:
- the value object