@Test public void getFlagShouldReturnFalseWhenFlagIsNotSet() { final Byte bitmask = (byte) 0; final BitmaskMeasurementElement element = new BitmaskMeasurementElement(bitmask); final boolean expected = false; final boolean actual = element.getFlag(BitmaskFlag.FLAG_1); assertThat(actual).isEqualTo(expected); }
public boolean getFlag(final BitmaskFlag flag) { return (this.value & flag.value) > 0; }
BitmaskMeasurementElement implements MeasurementElement, Serializable { public boolean getFlag(final BitmaskFlag flag) { return (this.value & flag.value) > 0; } }
BitmaskMeasurementElement implements MeasurementElement, Serializable { public boolean getFlag(final BitmaskFlag flag) { return (this.value & flag.value) > 0; } BitmaskMeasurementElement(final Byte value); }
BitmaskMeasurementElement implements MeasurementElement, Serializable { public boolean getFlag(final BitmaskFlag flag) { return (this.value & flag.value) > 0; } BitmaskMeasurementElement(final Byte value); Byte getValue(); boolean getFlag(final BitmaskFlag flag); Set<BitmaskFlag> asEnumSet(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); }
BitmaskMeasurementElement implements MeasurementElement, Serializable { public boolean getFlag(final BitmaskFlag flag) { return (this.value & flag.value) > 0; } BitmaskMeasurementElement(final Byte value); Byte getValue(); boolean getFlag(final BitmaskFlag flag); Set<BitmaskFlag> asEnumSet(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }