This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Class and Description |
---|---|
protected static enum |
Modifier and Type | Field and Description |
---|---|
public int[] | |
protected Bits. | |
private static final int[] | |
private static final int | |
private static final int | |
private static final int |
Access | Constructor and Description |
---|---|
public | |
public | |
public | |
protected |
Modifier and Type | Method and Description |
---|---|
public Bits | |
public Bits | |
public void | |
public Bits | |
public Bits | |
protected int[] | |
public void | |
public void | |
public void | |
public void | |
protected void | |
protected void | |
public boolean | |
public boolean | |
public int | |
public Bits | |
public void | |
protected void | |
public String | |
private static int | |
public Bits |
bits | back to summary |
---|---|
public int[] bits |
currentState | back to summary |
---|---|
protected Bits. |
unassignedBits | back to summary |
---|---|
private static final int[] unassignedBits |
wordlen | back to summary |
---|---|
private static final int wordlen |
wordmask | back to summary |
---|---|
private static final int wordmask |
wordshift | back to summary |
---|---|
private static final int wordshift |
Bits | back to summary |
---|---|
public Bits() Construct an initially empty set. |
Bits | back to summary |
---|---|
public Bits(Bits someBits) |
Bits | back to summary |
---|---|
public Bits(boolean reset) |
Bits | back to summary |
---|---|
protected Bits(int[] bits, Bits. Construct a set consisting initially of given bit vector. |
andSet | back to summary |
---|---|
public Bits andSet(Bits xs) this set = this set & xs. |
assign | back to summary |
---|---|
public Bits assign(Bits someBits) |
clear | back to summary |
---|---|
public void clear() This set = {}. |
diffSet | back to summary |
---|---|
public Bits diffSet(Bits xs) this set = this set \ xs. |
dup | back to summary |
---|---|
public Bits dup() Return a copy of this set. |
dupBits | back to summary |
---|---|
protected int[] dupBits() |
excl | back to summary |
---|---|
public void excl(int x) Exclude x from this set. |
excludeFrom | back to summary |
---|---|
public void excludeFrom(int start) Exclude [start...end] from this set. |
incl | back to summary |
---|---|
public void incl(int x) Include x in this set. |
inclRange | back to summary |
---|---|
public void inclRange(int start, int limit) Include [start..limit) in this set. |
internalAndSet | back to summary |
---|---|
protected void internalAndSet(Bits xs) |
internalReset | back to summary |
---|---|
protected void internalReset() |
isMember | back to summary |
---|---|
public boolean isMember(int x) Is x an element of this set? |
isReset | back to summary |
---|---|
public boolean isReset() |
nextBit | back to summary |
---|---|
public int nextBit(int x) Return the index of the least bit position ≥ x that is set. If none are set, returns -1. This provides a nice way to iterate over the members of a bit set:
|
orSet | back to summary |
---|---|
public Bits orSet(Bits xs) this set = this set | xs. |
reset | back to summary |
---|---|
public void reset() |
sizeTo | back to summary |
---|---|
protected void sizeTo(int len) |
toString | back to summary |
---|---|
public String toString() Overrides java. a string representation of this set.
|
trailingZeroBits | back to summary |
---|---|
private static int trailingZeroBits(int x) Count trailing zero bits in an int. Algorithm from "Hacker's Delight" by Henry S. Warren Jr. (figure 5-13) |
xorSet | back to summary |
---|---|
public Bits xorSet(Bits xs) this set = this set ^ xs. |
Modifier and Type | Field and Description |
---|---|
public static final Bits. | |
public static final Bits. | |
public static final Bits. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
pack-priv static Bits. | |
public static Bits. | |
public static Bits. |
NORMAL | back to summary |
---|---|
public static final Bits. |
UNINIT | back to summary |
---|---|
public static final Bits. |
UNKNOWN | back to summary |
---|---|
public static final Bits. |
BitsState | back to summary |
---|---|
private BitsState() |
getState | back to summary |
---|---|
pack-priv static Bits. |
valueOf | back to summary |
---|---|
public static Bits. |
values | back to summary |
---|---|
public static Bits. |