Class CssNumericNode
- java.lang.Object
-
- com.google.common.css.compiler.ast.CssNode
-
- com.google.common.css.compiler.ast.CssValueNode
-
- com.google.common.css.compiler.ast.CssNumericNode
-
- All Implemented Interfaces:
Locatable
public class CssNumericNode extends CssValueNode
A CSS node containing a numeric value such as height, width, length, or percentage values.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNO_UNITSConstant value for the units field for a node without units.
-
Constructor Summary
Constructors Constructor Description CssNumericNode(CssNumericNode node)Copy constructor.CssNumericNode(java.lang.String value, java.lang.String unit)Constructor of a numeric node.CssNumericNode(java.lang.String value, java.lang.String unit, SourceCodeLocation sourceCodeLocation)Constructor of a numeric node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CssNumericNodedeepCopy()java.lang.StringgetNumericPart()java.lang.StringgetUnit()java.lang.StringgetValue()voidsetNumericPart(java.lang.String numericPart)voidsetUnit(java.lang.String unit)voidsetValue(java.lang.String value)Subclasses should perform additional consistency checks.java.lang.StringtoString()Use for debugging only.-
Methods inherited from class com.google.common.css.compiler.ast.CssValueNode
getIsDefault, setIsDefault
-
Methods inherited from class com.google.common.css.compiler.ast.CssNode
ancestors, appendComment, deepCopyNodes, equals, getComments, getParent, getShouldBeFlipped, getSourceCodeLocation, getVisitController, hasComment, hashCode, inFunArgs, setComments, setShouldBeFlipped, setSourceCodeLocation
-
-
-
-
Field Detail
-
NO_UNITS
public static final java.lang.String NO_UNITS
Constant value for the units field for a node without units.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CssNumericNode
public CssNumericNode(java.lang.String value, java.lang.String unit)Constructor of a numeric node.- Parameters:
value- valueunit- unit
-
CssNumericNode
public CssNumericNode(java.lang.String value, java.lang.String unit, @Nullable SourceCodeLocation sourceCodeLocation)Constructor of a numeric node.- Parameters:
value- valueunit- unitsourceCodeLocation- sourceCodeLocation
-
CssNumericNode
public CssNumericNode(CssNumericNode node)
Copy constructor.- Parameters:
node- node
-
-
Method Detail
-
deepCopy
public CssNumericNode deepCopy()
- Specified by:
deepCopyin classCssValueNode
-
getUnit
public java.lang.String getUnit()
-
setUnit
public void setUnit(java.lang.String unit)
-
getNumericPart
public java.lang.String getNumericPart()
-
setNumericPart
public void setNumericPart(java.lang.String numericPart)
-
setValue
public void setValue(java.lang.String value)
Description copied from class:CssValueNodeSubclasses should perform additional consistency checks. For example, a boolean expression node will not allow setting this as boolean expression trees are immutable.- Overrides:
setValuein classCssValueNode
-
getValue
public java.lang.String getValue()
- Overrides:
getValuein classCssValueNode
-
toString
public java.lang.String toString()
Description copied from class:CssValueNodeUse for debugging only.- Overrides:
toStringin classCssValueNode- See Also:
Object.toString()
-
-