int noOfIncludedElements = 0; EnumElement lastIncluded = null; for (EnumElement elem : getElements(sc)) { if (elem.equals(emptyElement)) { continue;
elements: for (EnumElement element : getElements(sc)) { for (String elementToInclude : applicableVals) { if (element.name.equals(elementToInclude)) continue elements;
	public IConsequence.Result include(SessionContents sc,			String[] applicableVals, int sequence) {		// TODO A better implementation might be to identify all not		// applicable values and then call exclude on them (and map violation		// texts)		IConsequence.Result result = new IConsequence.Result();		int noOfIncludedElements = 0;		EnumElement lastIncluded = null;		for (EnumElement elem : getElements(sc)) {			if (elem.equals(emptyElement)) {				continue;			}			boolean isIncluded = false;			for (int i = 0; i < applicableVals.length; i++) {				if (elem.name.equals(applicableVals[i])) {					if (elem.sequence != 0 && getSequence() < sequence							&& !elem.available) {						result.setViolation("Inclusion of excluded value "								+ elem.name + " for attribute " + getName());					}					isIncluded = true;					noOfIncludedElements++;					lastIncluded = elem;					if (elem.available == false) {						elem.available = true;						elem.sequence = sequence;					}					break;				} else if (elem.sequence != 0 && getSequence() < sequence						&& elem.selected) {					result							.setViolation("Inclusion does not contain selected value "									+ elem.name + " for attribute " + getName());				}			}			if (!isIncluded) {				if (elem.sequence != 0 && getSequence() < sequence						&& elem.selected) {					result							.setViolation("Inclusion does not contain selected value "									+ elem.name + " for attribute " + getName());				}				// deselect the value if it is already selected				elem.available = false;				if (elem.selected) {					select(sc, "-", 0);				}				elem.sequence = sequence;			}		}		if (noOfIncludedElements == 1) {			select(sc, lastIncluded.name, sequence);		}		setSequence(sequence);		return result;	}