Class Expression

  • Direct Known Subclasses:
    JavaScriptExpression

    public abstract class Expression
    extends java.lang.Object
    Base expression with value formating.
    • Method Detail

      • getType

        public final int getType()
      • appendTo

        public void appendTo​(CssFormatter formatter)
      • getDataType

        public abstract int getDataType​(CssFormatter formatter)
        The data type of the expression
        Parameters:
        formatter - the CCS target
        Returns:
        one of the constant
      • doubleValue

        public abstract double doubleValue​(CssFormatter formatter)
        Get the numeric value.
        Parameters:
        formatter - the CCS target
        Returns:
        the value
      • booleanValue

        public abstract boolean booleanValue​(CssFormatter formatter)
        Get the boolean value
        Parameters:
        formatter - the CCS target
        Returns:
        the value
      • stringValue

        public java.lang.String stringValue​(CssFormatter formatter)
        Get the string value
        Parameters:
        formatter - the CCS target
        Returns:
        the value
      • listValue

        public com.inet.lib.less.Operation listValue​(CssFormatter formatter)
        Get the value as a list
        Parameters:
        formatter - the CCS target
        Returns:
        the value
      • unit

        public abstract java.lang.String unit​(CssFormatter formatter)
        Get the unit of a NUMBER value.
        Parameters:
        formatter - the CCS target
        Returns:
        the unit or empty string if nothing
      • toString

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