Package com.graphhopper.coll
Class GHBitSetImpl
java.lang.Object
java.util.BitSet
com.graphhopper.coll.GHBitSetImpl
- All Implemented Interfaces:
GHBitSet
,Serializable
,Cloneable
This implementation stores the bits inside the values of a long-array. Be aware that the size of this array grows
depending on the values you pass into this set. If you only want to add a few (possibly large) integers you should
use
GHTBitSet
instead.- Author:
- Peter Karich
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.BitSet
and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, previousClearBit, previousSetBit, set, set, set, set, size, stream, toByteArray, toLongArray, toString, valueOf, valueOf, valueOf, valueOf, xor
-
Constructor Details
-
GHBitSetImpl
public GHBitSetImpl() -
GHBitSetImpl
public GHBitSetImpl(int nbits)
-
-
Method Details
-
contains
public final boolean contains(int index) -
add
public final void add(int index) -
getCardinality
public final int getCardinality()- Specified by:
getCardinality
in interfaceGHBitSet
-
next
public final int next(int index) Description copied from interface:GHBitSet
Searches for a greater or equal entry and returns it. -
nextClear
public final int nextClear(int index) -
remove
public void remove(int index) -
copyTo
-