public abstract class Valuable extends Annotatable
Constructor and Description |
---|
Valuable() |
Modifier and Type | Method and Description |
---|---|
List<?> |
asCollection()
Get the value as collection or null if it is not a collection ValueType
|
ComplexValue |
asComplex()
Get the value in its complex representation or null if it is not based on a complex ValueType
|
Object |
asEnum()
Get the value in its enum representation or null if it is not based on a enum ValueType
|
Geospatial |
asGeospatial()
Get the value in its geospatial representation or null if it is not based on a geospatial ValueType
|
Object |
asPrimitive()
Get the value in its primitive representation or null if it is not based on a primitive ValueType
|
boolean |
equals(Object o) |
String |
getType()
Get string representation of type (can be null if not set).
|
Object |
getValue()
Get the value
|
ValueType |
getValueType()
Get value type for this valuable.
|
int |
hashCode() |
boolean |
isCollection()
Check if Valuable contains a COLLECTION_* ValueType
|
boolean |
isComplex()
Check if Valuable contains a COMPLEX or COLLECTION_COMPLEX ValueType
|
boolean |
isEnum()
Check if Valuable contains a ENUM or COLLECTION_ENUM ValueType
|
boolean |
isGeospatial()
Check if Valuable contains a GEOSPATIAL or COLLECTION_GEOSPATIAL ValueType
|
boolean |
isNull()
Check if according value is
null . |
boolean |
isPrimitive()
Check if Valuable contains a PRIMITIVE or COLLECTION_PRIMITIVE ValueType
|
void |
setType(String type)
Set string representation of type.
|
void |
setValue(ValueType valueType,
Object value)
Set value and value type.
|
String |
toString() |
getAnnotations
public boolean isNull()
null
.true
if value is null
, otherwise false
public String getType()
public void setType(String type)
type
- string representation of typepublic boolean isPrimitive()
public boolean isGeospatial()
public boolean isEnum()
public boolean isComplex()
public boolean isCollection()
public Object asPrimitive()
public Geospatial asGeospatial()
public Object asEnum()
public ComplexValue asComplex()
public List<?> asCollection()
public Object getValue()
public void setValue(ValueType valueType, Object value)
valueType
- value typevalue
- valuepublic ValueType getValueType()
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.