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 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()
-
-
-
Field Detail
-
TYPE
public static final int TYPE
- See Also:
- Constant Field Values
-
-
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 classjava.lang.Number
-
longValue
public long longValue()
- Specified by:
longValue
in classjava.lang.Number
-
floatValue
public float floatValue()
- Specified by:
floatValue
in classjava.lang.Number
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classjava.lang.Number
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-