Class FloatItem

All Implemented Interfaces:
Serializable, Item

public class FloatItem extends AbstractAtomicItem
See Also:
  • Constructor Details

    • FloatItem

      public FloatItem(float value)
  • Method Details

    • copy

      public Item copy(boolean mutable)
      Description copied from interface: Item
      Makes a copy.
      Parameters:
      mutable - whether the copy should be mutable (if supported by the item).
      Returns:
      a copy
    • getFloatValue

      public float getFloatValue()
      Description copied from interface: Item
      Returns the float value of the item, if it is a float.
      Returns:
      the float value.
    • getVariantValue

      public Object getVariantValue()
      Description copied from interface: Item
      Returns the Object containing the converted value of the item for a DataFrame. For use to build Variant columns.
      Returns:
      Object representing the converted value of the item.
    • getEffectiveBooleanValue

      public boolean getEffectiveBooleanValue()
      Description copied from interface: Item
      Returns the effective boolean value of the item, if atomic.
      Returns:
      the effective boolean value.
    • getStringValue

      public String getStringValue()
      Description copied from interface: Item
      Returns the string value of the item, if it is an atomic item.
      Returns:
      the string value.
    • castToDoubleValue

      public double castToDoubleValue()
      Description copied from interface: Item
      Casts the item to a double value (must be a numeric).
      Returns:
      the double value.
    • castToFloatValue

      public float castToFloatValue()
      Description copied from interface: Item
      Casts the item to a float value (must be a numeric).
      Returns:
      the float value.
    • castToDecimalValue

      public BigDecimal castToDecimalValue()
      Description copied from interface: Item
      Casts the item to a decimal value (must be a numeric).
      Returns:
      the BigDecimal value.
    • castToIntValue

      public int castToIntValue()
      Description copied from interface: Item
      Casts the item to an integer value (must be a numeric).
      Returns:
      the int value.
    • castToIntegerValue

      public BigInteger castToIntegerValue()
      Description copied from interface: Item
      Casts the item to a big integer value (must be a numeric).
      Returns:
      the BigInteger value.
    • isFloat

      public boolean isFloat()
      Description copied from interface: Item
      Tests whether the item is an atomic item of type float.
      Returns:
      true if it is an atomic item of type float, false otherwise.
    • getDynamicType

      public ItemType getDynamicType()
      Description copied from interface: Item
      Returns the dynamic type of the item (only for error message purposes).
      Returns:
      the dynamic type as an item type.
    • isNumeric

      public boolean isNumeric()
      Description copied from interface: Item
      Tests whether the item is a number (decimal or double).
      Returns:
      true if it is a number, false otherwise.
    • isAtomic

      public boolean isAtomic()
      Description copied from interface: Item
      Tests whether the item is an atomic item.
      Returns:
      true if it is an atomic item, false otherwise.
    • isNaN

      public boolean isNaN()
      Description copied from interface: Item
      Checks doubles and floats for NaN.
      Returns:
      true if NaN, false if not NaN.
    • generateNativeQuery

      public NativeClauseContext generateNativeQuery(NativeClauseContext context)
      Description copied from interface: Item
      Get sparkSql string for the item
      Parameters:
      context - input context
      Returns:
      String representing the item in a sparksql query or null if it is not supported for the item
    • getSparkSQLValue

      public String getSparkSQLValue()
      Description copied from interface: Item
      Returns the SparkSQL value of the item for use in a query.
      Returns:
      String representing the SparkSQL value of the item.
    • getSparkSQLValue

      public String getSparkSQLValue(ItemType itemType)
      Description copied from interface: Item
      Returns the SparkSQL value of the item for use in a query.
      Returns:
      String representing the SparkSQL value of the item.
    • getSparkSQLType

      public String getSparkSQLType()
      Description copied from interface: Item
      Returns the SparkSQL type of the item for use in a query.
      Returns:
      String representing the SparkSQL type of the item.