Class ExValue

java.lang.Object
org.zkoss.zk.xel.ExValue
All Implemented Interfaces:
Serializable

public class ExValue extends Object implements Serializable
Used to represent a string value that might contain an expression. It is serializable and the expression is parsed by demand.
Since:
3.0.0
Author:
tomyeh
See Also:
  • Constructor Details

    • ExValue

      public ExValue(String value, Class expectedType)
      Constructor.
      Parameters:
      value - the value. It can be null.
  • Method Details

    • isExpression

      public boolean isExpression()
      Tests whether it is an expression. Note: it is a wild guess. In other words, it returns false only if 100% not an expression.
    • getRawValue

      public final String getRawValue()
      Returns the raw value. The raw value is the value passed to the constructor. That is, it might contain EL expressions.
    • setRawValue

      public void setRawValue(String value)
      Sets the raw value.
      Parameters:
      value - the value. It can be null.
    • getExpectedType

      public final Class getExpectedType()
      Returns the expected type.
    • setExpectedType

      public final void setExpectedType(Class expectedType)
      Sets the expected type.
    • getValue

      public Object getValue(Evaluator eval, Page page) throws org.zkoss.xel.XelException
      Returns the value after evaluation.
      Throws:
      org.zkoss.xel.XelException
    • getValue

      public Object getValue(Evaluator eval, Component comp) throws org.zkoss.xel.XelException
      Returns the value after evaluation.
      Throws:
      org.zkoss.xel.XelException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object