Class ValidWhenResult<T>

java.lang.Object
org.apache.struts.validator.validwhen.ValidWhenResult<T>
Type Parameters:
T - the current type of the result
Direct Known Subclasses:
ValidWhenResultBigDecimal, ValidWhenResultBoolean, ValidWhenResultInteger, ValidWhenResultString

public class ValidWhenResult<T> extends Object
Holds the (interim) result during processing the parsing-tree.
Since:
Struts 1.4.1
Author:
Graff Stefan
  • Field Details

    • type

      protected final Class<T> type
      The current type of the result.
    • value

      protected final T value
      The value of the result.
  • Constructor Details

    • ValidWhenResult

      protected ValidWhenResult(Class<T> type, T value)
      Constructs this class.
      Parameters:
      type - the current type of the result
      value - the current value of the result
  • Method Details

    • getType

      public Class<T> getType()
      Gets the current type of the result.
      Returns:
      the current type of the result
    • getValue

      public T getValue()
      Gets the current value of the result.
      Returns:
      the current value of the result
    • toBoolean

      public boolean toBoolean()
      Gets the Boolean-value if the current result is a boolean.
      Returns:
      the boolean-value if the value is a boolean otherwise false.
    • toString

      public String toString()
      Overrides:
      toString in class Object