code: @Override
  	public Condition build() {
  		switch (getType()) {
  			case OR: {
  				List<Condition> conditions = new ArrayList<>(operands.size());
  
  				for (BooleanExpression operand : operands) {
  					conditions.add(operand.build());
  				}
  
  				// The subordinate API is a bit nasty, we have to split the list after the first two conditions.
  				if (conditions.size() < 2) {
  					throw new IllegalArgumentException(
  							"An OR expression must include at least two operands.");
  				}
  
  				List<Condition> extraConditionsList = conditions.subList(2, conditions.size());
  				Condition[] extraConditions = extraConditionsList.toArray(
  						new Condition[extraConditionsList.size()]);
  				return new Or(conditions.get(0), conditions.get(1), extraConditions);
  			}
  			case AND: {
  				List<Condition> conditions = new ArrayList<>(operands.size());
  
  				for (BooleanExpression operand : operands) {
  					conditions.add(operand.build());
  				}
  
  				// The subordinate API is a bit nasty, we have to split the list after the first two conditions.
  				if (conditions.size() < 2) {
  					throw new IllegalArgumentException(
  							"An AND expression must include at least two operands.");
  				}
  
  				List<Condition> extraConditionsList = conditions.subList(2, conditions.size());
  				Condition[] extraConditions = extraConditionsList.toArray(
  						new Condition[extraConditionsList.size()]);
  				return new And(conditions.get(0), conditions.get(1), extraConditions);
  			}
  
  			case NOT:
  				if (operands.size() != 1) {
  					throw new IllegalArgumentException("A NOT expression must have 1 operand");
  				}
  				BooleanExpression operand = operands.get(0);
  				return new Not(operand.build());
  
  			default:
  				throw new IllegalArgumentException("Unknown action type: " + getType());
  		}
  
  	}
docs: {@inheritDoc}