Class ClientPrimitiveValueImpl
java.lang.Object
org.apache.olingo.client.api.domain.AbstractClientValue
org.apache.olingo.client.core.domain.ClientPrimitiveValueImpl
- All Implemented Interfaces:
ClientPrimitiveValue,ClientValue
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.olingo.client.api.domain.ClientPrimitiveValue
ClientPrimitiveValue.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasEnum()Casts to enum value.booleangetType()Gets value type name.inthashCode()booleanCheck is is a complex value.booleanisEnum()Check is is an enum value.<T> TtoCastValue(Class<T> reference) Returns the current value casted to the given type.toString()Serialize the current value as String.toValue()Returns the current value as generic Object.Methods inherited from class org.apache.olingo.client.api.domain.AbstractClientValue
asCollection, asComplex, asPrimitive, isCollection, isPrimitiveMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.olingo.client.api.domain.ClientValue
asCollection, asComplex, asPrimitive, isCollection, isPrimitive
-
Constructor Details
-
ClientPrimitiveValueImpl
protected ClientPrimitiveValueImpl()
-
-
Method Details
-
getTypeName
Description copied from interface:ClientValueGets value type name.- Specified by:
getTypeNamein interfaceClientValue- Overrides:
getTypeNamein classAbstractClientValue- Returns:
- value type name.
-
getTypeKind
- Specified by:
getTypeKindin interfaceClientPrimitiveValue
-
getType
- Specified by:
getTypein interfaceClientPrimitiveValue
-
toValue
Description copied from interface:ClientPrimitiveValueReturns the current value as generic Object.- Specified by:
toValuein interfaceClientPrimitiveValue- Returns:
- an uncasted instance of this value
-
toCastValue
Description copied from interface:ClientPrimitiveValueReturns the current value casted to the given type.- Specified by:
toCastValuein interfaceClientPrimitiveValue- Type Parameters:
T- cast type- Parameters:
reference- class reference- Returns:
- the current value as typed java instance
- Throws:
EdmPrimitiveTypeException- if the object is not assignable to the type T.
-
toString
Description copied from interface:ClientPrimitiveValueSerialize the current value as String.- Specified by:
toStringin interfaceClientPrimitiveValue- Overrides:
toStringin classAbstractClientValue- Returns:
- a String representation of this value
-
isEnum
public boolean isEnum()Description copied from interface:ClientValueCheck is is an enum value.- Specified by:
isEnumin interfaceClientValue- Returns:
- 'TRUE' if enum; 'FALSE' otherwise.
-
asEnum
Description copied from interface:ClientValueCasts to enum value.- Specified by:
asEnumin interfaceClientValue- Returns:
- enum value.
-
isComplex
public boolean isComplex()Description copied from class:AbstractClientValueCheck is is a complex value.- Specified by:
isComplexin interfaceClientValue- Overrides:
isComplexin classAbstractClientValue- Returns:
- 'TRUE' if complex; 'FALSE' otherwise.
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractClientValue
-
equals
- Overrides:
equalsin classAbstractClientValue
-