ConflictState (final boolean tree, final boolean text, final boolean property) { final ConflictState[] conflictStates = values(); for (ConflictState state : conflictStates) { if ((state.isTree() == tree) && (state.isText() == text) && (state.isProperty() == property)) { return state; } } // all combinations are defined assert false; return null; }