public final class JBitSet
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
private java.util.BitSet |
bitSet |
|
private int |
size |
Modifier | Constructor | Description |
---|---|---|
|
JBitSet(int size) |
Construct a JBitSet of the specified size.
|
private |
JBitSet(java.util.BitSet bitSet,
int size) |
Construct a JBitSet with the specified bitSet.
|
Modifier and Type | Method | Description |
---|---|---|
void |
and(JBitSet set) |
|
void |
clear(int bitIndex) |
|
void |
clearAll() |
Clear all of the bits in this JBitSet
|
java.lang.Object |
clone() |
|
boolean |
contains(JBitSet jBitSet) |
Test to see if one JBitSet contains another one of
the same size.
|
boolean |
equals(java.lang.Object obj) |
|
boolean |
get(int bitIndex) |
|
int |
getFirstSetBit() |
Get the first set bit (starting at index 0) from a JBitSet.
|
void |
grow(int newSize) |
Grow an existing JBitSet to the specified size.
|
int |
hashCode() |
|
boolean |
hasSingleBitSet() |
See of a JBitSet has exactly 1 bit set.
|
void |
or(JBitSet set) |
|
void |
set(int bitIndex) |
|
void |
setTo(JBitSet sourceBitSet) |
Set the BitSet to have the exact same bits set as the parameter's BitSet.
|
int |
size() |
Return the size of bitSet
|
java.lang.String |
toString() |
|
void |
xor(JBitSet set) |
public JBitSet(int size)
size
- The number of bits in the JBitSet.private JBitSet(java.util.BitSet bitSet, int size)
bitSet
- The BitSet.size
- The size of bitSet.
NOTE: We need to specify the size since the size of a
BitSet is not guaranteed to be the same as JBitSet.size().public void setTo(JBitSet sourceBitSet)
sourceBitSet
- The JBitSet to copy.public boolean contains(JBitSet jBitSet)
jBitSet
- JBitSet that we want to know if it is
a subset of current JBitSetpublic boolean hasSingleBitSet()
public int getFirstSetBit()
public void grow(int newSize)
newSize
- The new sizepublic void clearAll()
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 hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean get(int bitIndex)
public void set(int bitIndex)
public void clear(int bitIndex)
public void and(JBitSet set)
public void or(JBitSet set)
public void xor(JBitSet set)
public int size()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.