State (@NotNull State state, boolean thirdStateEnabled) { return switch (state) { case SELECTED -> State.NOT_SELECTED; case NOT_SELECTED -> thirdStateEnabled ? State.DONT_CARE : State.SELECTED; case DONT_CARE -> State.SELECTED; }; }