@Test public void testRemove() { final Flags flags = new Flags(0x00000001 << 1 | 0x00000001 << 2 | 0x00000001 << 3); assertThat(flags.remove(0x00000001 << 1), is(flags)); assertThat(flags.get(), is(0x00000001 << 2 | 0x00000001 << 3)); assertThat(flags.has(0x00000001 << 1), is(false)); assertThat(flags.remove(0x00000001 << 2), is(flags)); assertThat(flags.get(), is(0x00000001 << 3)); assertThat(flags.has(0x00000001 << 2), is(false)); assertThat(flags.remove(0x00000001 << 3), is(flags)); assertThat(flags.get(), is(0)); assertThat(flags.has(0x00000001 << 3), is(false)); }
public Flags remove(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag) { this.flags &= ~flag; return this; }
Flags { public Flags remove(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag) { this.flags &= ~flag; return this; } }
Flags { public Flags remove(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag) { this.flags &= ~flag; return this; } Flags();  Flags(@IntRange(from = 0, to = Integer.MAX_VALUE) final int flags); }
Flags { public Flags remove(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag) { this.flags &= ~flag; return this; } Flags();  Flags(@IntRange(from = 0, to = Integer.MAX_VALUE) final int flags); Flags add(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag); Flags remove(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag); boolean has(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag); @IntRange(from = 0, to = Integer.MAX_VALUE) int get(); Flags reset(); }
Flags { public Flags remove(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag) { this.flags &= ~flag; return this; } Flags();  Flags(@IntRange(from = 0, to = Integer.MAX_VALUE) final int flags); Flags add(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag); Flags remove(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag); boolean has(@IntRange(from = 1, to = Integer.MAX_VALUE) final int flag); @IntRange(from = 0, to = Integer.MAX_VALUE) int get(); Flags reset();  }