Package org.opengrok.suggest.query.data
Class BitIntsHolder
java.lang.Object
java.util.BitSet
org.opengrok.suggest.query.data.BitIntsHolder
- All Implemented Interfaces:
Serializable
,Cloneable
,IntsHolder
IntsHolder
implementation by using the BitSet
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
has
(int i) Determines whether the data structure containsi
value.int
Returns number of elements.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
-
BitIntsHolder
public BitIntsHolder() -
BitIntsHolder
public BitIntsHolder(int nbits)
-
-
Method Details
-
has
public boolean has(int i) Determines whether the data structure containsi
value.- Specified by:
has
in interfaceIntsHolder
- Parameters:
i
- value which presence is checked- Returns:
true
ifi
is present.false
otherwise.
-
numberOfElements
public int numberOfElements()Returns number of elements.- Specified by:
numberOfElements
in interfaceIntsHolder
- Returns:
- number of elements.
-