org.apache.olingo.client.api.domain

## Interface ClientPrimitiveValue

- All Superinterfaces:
    ClientValue

      public interface ClientPrimitiveValue
      extends ClientValue

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `ClientPrimitiveValue.Builder`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `EdmPrimitiveType` | `getType()`
    `EdmPrimitiveTypeKind` | `getTypeKind()`
    `<T> T` | `toCastValue(Class<T> reference)` Returns the current value casted to the given type.
    `String` | `toString()` Serialize the current value as String.
    `Object` | `toValue()` Returns the current value as generic Object.

    - ### Methods inherited from interface org.apache.olingo.client.api.domain.ClientValue

      `asCollection, asComplex, asEnum, asPrimitive, getTypeName, isCollection, isComplex, isEnum, isPrimitive`

- - ### Method Detail

    - #### getTypeKind

          EdmPrimitiveTypeKind getTypeKind()

    - #### getType

          EdmPrimitiveType getType()

    - #### toValue

          Object toValue()

      Returns the current value as generic Object.
      Returns:
        an uncasted instance of this value

    - #### toCastValue

          <T> T toCastValue(Class<T> reference)
                     throws EdmPrimitiveTypeException

      Returns the current value casted to the given type.
      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

          String toString()

      Serialize the current value as String.
      Overrides:
        `toString` in class `Object`
      Returns:
        a String representation of this value

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.