public final class BitSet
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
BASE_LONG |
static BitSet |
EMPTY |
static int |
FALSE_BIT |
static int |
MAX_BIT_INDEX |
static int |
MAX_BIT_SIZE |
static int |
TRUE_BIT |
Modifier and Type | Method and Description |
---|---|
BitSet |
and(BitSet bs) |
java.lang.String |
asString() |
int |
bitsOn() |
int |
bitsToRight(int index) |
int |
bitsUsed() |
BitSet |
clear(int index) |
static BitSet |
empty() |
boolean |
equals(java.lang.Object obj) |
<A> A |
foldLeft(F2<A,java.lang.Boolean,A> f,
A acc) |
<A> A |
foldRight(F2<java.lang.Boolean,A,A> f,
A acc) |
boolean |
isEmpty() |
boolean |
isSet(int index) |
static BitSet |
listBitSet(List<java.lang.Boolean> list) |
static BitSet |
longBitSet(long l) |
long |
longValue() |
BitSet |
not() |
BitSet |
or(BitSet bs) |
BitSet |
range(int highIndex,
int lowIndex)
Returns the bit set from indices in the range from low (inclusive)
to high(exclusive) from the least significant bit (on the right),
e.g.
|
BitSet |
set(int index) |
BitSet |
set(int index,
boolean b) |
BitSet |
shiftLeft(int n) |
BitSet |
shiftRight(int n) |
static BitSet |
streamBitSet(Stream<java.lang.Boolean> s) |
static BitSet |
stringBitSet(java.lang.String s) |
BitSet |
takeLower(int n) |
BitSet |
takeUpper(int n) |
static boolean |
toBoolean(char c) |
static boolean |
toBoolean(int i) |
static int |
toInt(boolean b) |
List<java.lang.Boolean> |
toList() |
Stream<java.lang.Boolean> |
toStream()
Returns a stream of boolean where the head is the most significant bit
(the bit with the largest value)
|
java.lang.String |
toString() |
BitSet |
xor(BitSet bs) |
public static final int TRUE_BIT
public static final int FALSE_BIT
public static final BitSet EMPTY
public static final long BASE_LONG
public static final int MAX_BIT_SIZE
public static final int MAX_BIT_INDEX
public static BitSet empty()
public static BitSet longBitSet(long l)
public static BitSet stringBitSet(java.lang.String s)
public boolean isSet(int index)
public boolean isEmpty()
public BitSet set(int index)
public BitSet set(int index, boolean b)
public BitSet clear(int index)
public long longValue()
public BitSet shiftRight(int n)
public BitSet shiftLeft(int n)
public int bitsUsed()
public int bitsOn()
public Stream<java.lang.Boolean> toStream()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int bitsToRight(int index)
public List<java.lang.Boolean> toList()
public <A> A foldRight(F2<java.lang.Boolean,A,A> f, A acc)
public <A> A foldLeft(F2<A,java.lang.Boolean,A> f, A acc)
public BitSet not()
public BitSet takeLower(int n)
public BitSet takeUpper(int n)
public BitSet range(int highIndex, int lowIndex)
public static boolean toBoolean(char c)
public static boolean toBoolean(int i)
public static int toInt(boolean b)
public java.lang.String asString()