Class SassNumber

  • All Implemented Interfaces:
    SassValue, java.io.Serializable

    public class SassNumber
    extends java.lang.Number
    implements SassValue
    A sass number value.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int TYPE  
    • Constructor Summary

      Constructors 
      Constructor Description
      SassNumber​(double value, java.lang.String unit)
      Create a new number.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double doubleValue()  
      float floatValue()  
      java.lang.String getUnit()
      Return the unit.
      double getValue()
      Return the numeric value.
      int intValue()  
      long longValue()  
      void setUnit​(java.lang.String unit)
      Set the unit.
      void setValue​(double value)
      Set the numeric value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Number

        byteValue, shortValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SassNumber

        public SassNumber​(double value,
                          java.lang.String unit)
        Create a new number.
        Parameters:
        value - The numeric value.
        unit - The unit.
    • Method Detail

      • getValue

        public double getValue()
        Return the numeric value.
        Returns:
        The numeric value.
      • setValue

        public void setValue​(double value)
        Set the numeric value.
        Parameters:
        value - The numeric value.
      • getUnit

        public java.lang.String getUnit()
        Return the unit.
        Returns:
        The unit.
      • setUnit

        public void setUnit​(java.lang.String unit)
        Set the unit.
        Parameters:
        unit - The unit.
      • intValue

        public int intValue()
        Specified by:
        intValue in class java.lang.Number
      • longValue

        public long longValue()
        Specified by:
        longValue in class java.lang.Number
      • floatValue

        public float floatValue()
        Specified by:
        floatValue in class java.lang.Number
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in class java.lang.Number
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object