/** * Returns whether {@code this} contains the given literal value. */ public boolean contains(boolean literalValue) { switch (this.ordinal()) { case 0: return false; case 1: return literalValue; case 2: return !literalValue; case 3: return true; default: throw new IndexOutOfBoundsException("Ordinal: " + this.ordinal()); } }
/** * Returns whether {@code this} contains the given literal value. */ public boolean contains(boolean literalValue) { switch (this.ordinal()) { case 0: return false; case 1: return literalValue; case 2: return !literalValue; case 3: return true; default: throw new IndexOutOfBoundsException("Ordinal: " + this.ordinal()); } }