Direct Known Subclasses:
And, Equals, GreaterOrEqualTo, GreaterThan, LessOrEqualTo, LessThan, Not, NotEquals, Or, SameType

public class ConditionalHolder extends InteractiveValueHolder
A default unset conditional holder. This handles conditional operations.
  • Constructor Details

    • ConditionalHolder

      public ConditionalHolder(com.fasterxml.jackson.databind.JsonNode node)
      Create a new Conditional Holder
      Parameters:
      node - The JsonNode to refer
  • Method Details

    • getState

      public Boolean getState()
      Get the state of the condition
      Returns:
      Boolean value. Differs depending on each type of condition.
    • bothTypesAre

      public boolean bothTypesAre(Class<?> type)
      Check if both types of value A and B are a certain type.
      Parameters:
      type - Type to check for
      Returns:
      true or false
    • getValue

      public Object getValue()
      Description copied from class: ValueHolder
      Get the value being pointed to casted as an Object. The contents being returned by this method are mutable.
      Overrides:
      getValue in class ValueHolder
      Returns:
      A Boolean, casted to an Object.
      See Also:
    • getType

      public Class<?> getType()
      Description copied from class: ValueHolder
      Get the type being pointed to
      Overrides:
      getType in class ValueHolder
      Returns:
      Always returns Boolean
      See Also:
    • notEmpty

      public boolean notEmpty()
      Description copied from class: ValueHolder
      Check if this holder doesn't point to null
      Overrides:
      notEmpty in class ValueHolder
      Returns:
      true if this points to a value, false if it points to null
    • toString

      public String toString()
      Overrides:
      toString in class ValueHolder