|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.util.IntArrayPredicateIterator
public final class IntArrayPredicateIterator
Iterates over ranges between elements for which a given predicate returns
true. The returned range may be of zero length (getLength()).
An example probably best explains what this class does. Consider the following array:
[SEP, SEP, 1, SEP]where
SEP is something for which the predicate returns true.
If so, then the returned subranges would be equal to (start index, length):
[0,0] (empty range before the first separator) [1,0] (empty range after the first separator) [2,1] ([1]) [4,0] (empty range after last separator)
| Constructor Summary | |
|---|---|
IntArrayPredicateIterator(short[] array,
int from,
int length,
com.carrotsearch.hppc.predicates.ShortPredicate separator)
|
|
IntArrayPredicateIterator(short[] array,
com.carrotsearch.hppc.predicates.ShortPredicate separator)
|
|
| Method Summary | |
|---|---|
int |
getLength()
Returns the length (number of elements) of the range most recently acquired from next(). |
boolean |
hasNext()
|
Integer |
next()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntArrayPredicateIterator(short[] array,
int from,
int length,
com.carrotsearch.hppc.predicates.ShortPredicate separator)
public IntArrayPredicateIterator(short[] array,
com.carrotsearch.hppc.predicates.ShortPredicate separator)
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<Integer>public Integer next()
next in interface Iterator<Integer>public void remove()
remove in interface Iterator<Integer>public int getLength()
next().
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||