@Test public void testIsInputSelected() { assertFalse(new Builder().build().isInputSelected(1)); assertFalse(new Builder().select(2).build().isInputSelected(1)); assertTrue(new Builder().select(1).build().isInputSelected(1)); assertTrue(new Builder().select(1).select(2).build().isInputSelected(1)); assertTrue(new Builder().select(-1).build().isInputSelected(1)); assertTrue(new Builder().select(64).build().isInputSelected(64)); }
public boolean isInputSelected(int inputId) { return (inputMask & (1L << (inputId - 1))) != 0; }
InputSelection implements Serializable { public boolean isInputSelected(int inputId) { return (inputMask & (1L << (inputId - 1))) != 0; } }
InputSelection implements Serializable { public boolean isInputSelected(int inputId) { return (inputMask & (1L << (inputId - 1))) != 0; } private  InputSelection(long inputMask, boolean isALLMaskOf2); }
InputSelection implements Serializable { public boolean isInputSelected(int inputId) { return (inputMask & (1L << (inputId - 1))) != 0; } private  InputSelection(long inputMask, boolean isALLMaskOf2); long getInputMask(); boolean isInputSelected(int inputId); boolean areAllInputsSelected(); boolean isALLMaskOf2(); int fairSelectNextIndexOutOf2(int availableInputsMask, int lastReadInputIndex); @Override boolean equals(Object o); @Override String toString(); }
InputSelection implements Serializable { public boolean isInputSelected(int inputId) { return (inputMask & (1L << (inputId - 1))) != 0; } private  InputSelection(long inputMask, boolean isALLMaskOf2); long getInputMask(); boolean isInputSelected(int inputId); boolean areAllInputsSelected(); boolean isALLMaskOf2(); int fairSelectNextIndexOutOf2(int availableInputsMask, int lastReadInputIndex); @Override boolean equals(Object o); @Override String toString(); static final InputSelection ALL; static final InputSelection FIRST; static final InputSelection SECOND; }