Modifier and Type | Field and Description |
---|---|
static int |
DFLT_SETMAX
Default set size threshold.
|
Constructor and Description |
---|
IntegerBag()
Constructs an IntegerBag with a default set size threshold.
|
IntegerBag(int setmax)
Constructs an IntegerBag with a supplied set size threshold.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(long lval)
Adds an index to this bag.
|
long |
getCount()
Returns the number of distinct indices in this bag.
|
boolean |
hasIndex(long lval)
Indicates whether the given index has previously been added to this bag.
|
PrimitiveIterator.OfLong |
sortedLongIterator()
Returns an iterator over all the integers added to this bag,
supplied in ascending order.
|
public static final int DFLT_SETMAX
public IntegerBag()
public IntegerBag(int setmax)
setmax
- maximum HashSet sizepublic boolean hasIndex(long lval)
IndexBag
If the index is outside of the range permitted by this bag, behaviour is undefined.
public void addIndex(long lval)
IndexBag
If the index is outside of the range permitted by this bag, behaviour is undefined.
public long getCount()
IndexBag
public PrimitiveIterator.OfLong sortedLongIterator()
IndexBag
sortedLongIterator
in interface IndexBag
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.