java.lang.Object
io.sf.carte.echosvg.css.engine.value.AbstractValue
io.sf.carte.echosvg.css.engine.value.FloatValue
All Implemented Interfaces:
Value
Direct Known Subclasses:
LineHeightValue

public class FloatValue extends AbstractValue
This class represents float values.
  • Field Details

    • UNITS

      protected static final String[] UNITS
      The unit types representations
    • floatValue

      protected float floatValue
      The float value
    • unitType

      protected short unitType
      The unit type
  • Constructor Details

    • FloatValue

      public FloatValue(short unitType, float floatValue)
      Creates a new value.
  • Method Details

    • getCssText

      public static String getCssText(short unit, float value)
      Returns the CSS text associated with the given type/value pair.
    • getPrimitiveType

      public short getPrimitiveType()
      The type of the value.
      Specified by:
      getPrimitiveType in interface Value
      Overrides:
      getPrimitiveType in class AbstractValue
    • getFloatValue

      public float getFloatValue()
      Returns the float value.
      Specified by:
      getFloatValue in interface Value
      Overrides:
      getFloatValue in class AbstractValue
    • getCssText

      public String getCssText()
      A string representation of the current value.
    • toString

      public String toString()
      Returns a printable representation of this value.
      Overrides:
      toString in class Object