org.apache.uima.cas_data.impl

## Class PrimitiveValueImpl

- java.lang.Object
- - org.apache.uima.cas_data.impl.PrimitiveValueImpl

- All Implemented Interfaces:
    Serializable, FeatureValue, PrimitiveValue

      public class PrimitiveValueImpl
      extends Object
      implements PrimitiveValue

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrimitiveValueImpl(float aValue)`
    `PrimitiveValueImpl(int aValue)`
    `PrimitiveValueImpl(String aValue)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get()` Gets the feature value as a Java object.
    `float` | `toFloat()` Gets this value as a float.
    `int` | `toInt()` Gets this value as an integer.
    `String` | `toString()` Gets this value as a string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PrimitiveValueImpl

          public PrimitiveValueImpl(String aValue)

    - #### PrimitiveValueImpl

          public PrimitiveValueImpl(int aValue)

    - #### PrimitiveValueImpl

          public PrimitiveValueImpl(float aValue)

  - ### Method Detail

    - #### toString

          public String toString()

      Description copied from interface: `PrimitiveValue`
      Gets this value as a string.
      Specified by:
        `toString` in interface `PrimitiveValue`
      Overrides:
        `toString` in class `Object`
      Returns:
        string value

    - #### toInt

          public int toInt()

      Description copied from interface: `PrimitiveValue`
      Gets this value as an integer.
      Specified by:
        `toInt` in interface `PrimitiveValue`
      Returns:
        integer value, 0 if a non-integer

    - #### toFloat

          public float toFloat()

      Description copied from interface: `PrimitiveValue`
      Gets this value as a float.
      Specified by:
        `toFloat` in interface `PrimitiveValue`
      Returns:
        float value, 0 if a non-number.

    - #### get

          public Object get()

      Description copied from interface: `FeatureValue`
      Gets the feature value as a Java object.
      Specified by:
        `get` in interface `FeatureValue`
      Returns:
        the feature value.

Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.