|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.datamodel.record.impl.AnnotatableImpl
org.eclipse.smila.datamodel.record.impl.AttributeValueImpl
org.eclipse.smila.datamodel.record.impl.LiteralImpl
public class LiteralImpl
Default implementation of SMILA Literals.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.smila.datamodel.record.Literal |
|---|
Literal.DataType |
| Constructor Summary | |
|---|---|
LiteralImpl()
create new empty literal. |
|
LiteralImpl(java.lang.Object value)
create new literal from value. |
|
| Method Summary | |
|---|---|
static LiteralImpl |
ensureImpl(Literal someLiteral)
convert value to LiteralImpl if it is of another implementation. |
boolean |
equals(java.lang.Object obj)
Literals are equals when their values and datatypes are equal. |
java.lang.Boolean |
getBoolValue()
get the boolean value of the literal if this is a boolean literal. |
Literal.DataType |
getDataType()
data type of literal value. |
java.util.Date |
getDateTimeValue()
get the datetime value of the literal if this is a datetime literal. |
java.util.Date |
getDateValue()
get the date value of the literal if this is a date literal. |
java.lang.Double |
getFpValue()
get the floating point value of the literal if this is a floating point literal. |
java.lang.Long |
getIntValue()
get the integer value of the literal if this is an integer literal. |
java.lang.String |
getStringValue()
get the value object as a string. |
java.util.Date |
getTimeValue()
get the time value of the literal if this is a time literal. |
java.lang.Object |
getValue()
get the value object. |
int |
hashCode()
|
void |
setBoolValue(java.lang.Boolean value)
set a boolean value for this literal. |
void |
setDateTimeValue(java.util.Date value)
set a datetime value for this literal. |
void |
setDateValue(java.util.Date value)
set a date value for this literal. |
void |
setFpValue(java.lang.Double value)
set a floating point value for this literal. |
void |
setIntValue(java.lang.Integer value)
set an integer value for this literal. just a convenience method that converts to java.lang.Long |
void |
setIntValue(java.lang.Long value)
set an integer value for this literal. |
void |
setStringValue(java.lang.String value)
set a string value for this literal. |
void |
setTimeValue(java.util.Date value)
set a time value for this literal. |
void |
setValue(java.lang.Object value)
set a new value object for this literal. Apart from the supported classes this implementation also automatically converts Floats and BigDecimals to Doubles and all other subclasses of Number to Long. |
java.lang.String |
toString()
|
| Methods inherited from class org.eclipse.smila.datamodel.record.impl.AttributeValueImpl |
|---|
getSemanticType, setSemanticType |
| Methods inherited from class org.eclipse.smila.datamodel.record.impl.AnnotatableImpl |
|---|
addAnnotation, annotationsSize, getAnnotation, getAnnotationNames, getAnnotations, hasAnnotation, hasAnnotations, removeAnnotations, removeAnnotations, setAnnotation, setAnnotations |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.smila.datamodel.record.AttributeValue |
|---|
getSemanticType, setSemanticType |
| Methods inherited from interface org.eclipse.smila.datamodel.record.Annotatable |
|---|
addAnnotation, annotationsSize, getAnnotation, getAnnotationNames, getAnnotations, hasAnnotation, hasAnnotations, removeAnnotations, removeAnnotations, setAnnotation, setAnnotations |
| Constructor Detail |
|---|
public LiteralImpl()
public LiteralImpl(java.lang.Object value)
throws InvalidTypeException
value - value object
InvalidTypeException - if value object cannot be used by LiteralImpl| Method Detail |
|---|
public static LiteralImpl ensureImpl(Literal someLiteral)
someLiteral - literal in any implementation
public Literal.DataType getDataType()
getDataType in interface LiteralLiteral.getDataType()public java.lang.Boolean getBoolValue()
getBoolValue in interface LiteralLiteral.getBoolValue()public java.util.Date getDateTimeValue()
getDateTimeValue in interface LiteralLiteral.getDateTimeValue()public java.util.Date getDateValue()
getDateValue in interface LiteralLiteral.getDateValue()public java.lang.Double getFpValue()
getFpValue in interface LiteralLiteral.getFpValue()public java.lang.Long getIntValue()
getIntValue in interface LiteralLiteral.getIntValue()public java.lang.String getStringValue()
getStringValue in interface LiteralLiteral.getStringValue()public java.util.Date getTimeValue()
getTimeValue in interface LiteralLiteral.getTimeValue()public java.lang.Object getValue()
getValue in interface LiteralLiteral.getValue()public void setBoolValue(java.lang.Boolean value)
setBoolValue in interface Literalvalue - new boolean valueLiteral.setBoolValue(java.lang.Boolean)public void setDateTimeValue(java.util.Date value)
setDateTimeValue in interface Literalvalue - new datetime valueLiteral.setDateTimeValue(java.util.Date)public void setDateValue(java.util.Date value)
setDateValue in interface Literalvalue - new date valueLiteral.setDateValue(java.util.Date)public void setFpValue(java.lang.Double value)
setFpValue in interface Literalvalue - new floating point value.Literal.setFpValue(java.lang.Double)public void setIntValue(java.lang.Long value)
setIntValue in interface Literalvalue - new integer value.Literal.setIntValue(java.lang.Long)public void setIntValue(java.lang.Integer value)
setIntValue in interface Literalvalue - new integer value.Literal.setIntValue(java.lang.Integer)public void setStringValue(java.lang.String value)
setStringValue in interface Literalvalue - new string value.Literal.setStringValue(java.lang.String)public void setTimeValue(java.util.Date value)
setTimeValue in interface Literalvalue - new date/time/datetime valueLiteral.setTimeValue(java.util.Date)
public void setValue(java.lang.Object value)
throws InvalidTypeException
setValue in interface Literalvalue - new value object.
InvalidTypeException - illegal class of value object.Literal.setValue(java.lang.Object)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||