code: @Override
      public boolean condition(Object input) {
          switch (type) {
              case AND:
                  for (Condition c : conditions) {
                      boolean thisCond = c.condition(input);
                      if (!thisCond)
                          return false; //Any false -> AND is false
                  }
                  return true;
              case OR:
                  for (Condition c : conditions) {
                      boolean thisCond = c.condition(input);
                      if (thisCond)
                          return true; //Any true -> OR is true
                  }
                  return false;
              case NOT:
                  return !conditions[0].condition(input);
              case XOR:
                  return conditions[0].condition(input) ^ conditions[1].condition(input);
              default:
                  throw new RuntimeException("Unknown condition type: " + type);
          }
      }
docs: Condition on arbitrary input
  
  @param input the input to return
  the condition for
  @return true if the condition is met
  false otherwise