Package io.bit3.jsass.type
Class SassNumber
java.lang.Object
java.lang.Number
io.bit3.jsass.type.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 intTYPE -
Constructor Summary
Constructors Constructor Description SassNumber(double value, java.lang.String unit)Create a new number. -
Method Summary
Modifier and Type Method Description doubledoubleValue()floatfloatValue()java.lang.StringgetUnit()Return the unit.doublegetValue()Return the numeric value.intintValue()longlongValue()voidsetUnit(java.lang.String unit)Set the unit.voidsetValue(double value)Set the numeric value.java.lang.StringtoString()
-
Field Details
-
TYPE
public static final int TYPE- See Also:
- Constant Field Values
-
-
Constructor Details
-
SassNumber
public SassNumber(double value, java.lang.String unit)Create a new number.- Parameters:
value- The numeric value.unit- The unit.
-
-
Method Details
-
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:
intValuein classjava.lang.Number
-
longValue
public long longValue()- Specified by:
longValuein classjava.lang.Number
-
floatValue
public float floatValue()- Specified by:
floatValuein classjava.lang.Number
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classjava.lang.Number
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-