public class SelectFSs_impl<T extends FeatureStructure> extends Object implements SelectFSs<T>
Stream.Builder<T>| Constructor and Description |
|---|
SelectFSs_impl(CAS cas) |
SelectFSs_impl(FeatureStructure[] source,
CAS cas) |
SelectFSs_impl(FSArray source) |
SelectFSs_impl(FSList source) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allMatch(Predicate<? super T> predicate) |
SelectFSs_impl<T> |
allViews()
Miscellaneous
|
SelectFSs_impl<T> |
allViews(boolean bAllViews)
Extend or not extend the selection to be over all the CAS views, not just a single view.
|
boolean |
anyMatch(Predicate<? super T> predicate) |
T[] |
asArray(Class<? super T> clazz) |
ArrayList<T> |
asList() |
SelectFSs<T> |
at(AnnotationFS fs)
Subselection - specifies selecting Feature Structures having the same begin and end
- influenced by typePriority, positionUsesType, and useAnnotationEquals
Requires an Annotation Index.
|
SelectFSs<T> |
at(int begin,
int end)
Subselection - specifies selecting Feature Structures having the same begin and end
Requires an Annotation Index.
|
SelectFSs_impl<T> |
backwards()
Specifies that the iteration should run in reverse order from normal.
|
SelectFSs_impl<T> |
backwards(boolean bBackwards)
Specifies that the iteration should run in the normal or reverse order.
|
SelectFSs_impl<T> |
between(AnnotationFS fs1,
AnnotationFS fs2)
Subselection - specifies selecting Feature Structures
which lie between two annotations.
|
void |
close() |
<R,A> R |
collect(Collector<? super T,A,R> collector) |
<R> R |
collect(Supplier<R> supplier,
BiConsumer<R,? super T> accumulator,
BiConsumer<R,R> combiner) |
long |
count() |
SelectFSs_impl<T> |
coveredBy(AnnotationFS fs)
subselection based on boundingFs
|
SelectFSs_impl<T> |
coveredBy(int begin,
int end)
Subselection - specifies selecting Feature Structures
starting (and maybe ending) within a bounding Feature Structure
Requires an Annotation Index.
|
SelectFSs_impl<T> |
covering(AnnotationFS fs)
Subselection - specifies selecting Feature Structures
starting before or equal to bounding Feature Structure
and ending at or beyond the bounding Feature Structure
- influenced by typePriority, positionUsesType, useAnnotationEquals
Requires an Annotation Index.
|
SelectFSs_impl<T> |
covering(int begin,
int end)
Subselection - specifies selecting Feature Structures
starting before or equal to bounding Feature Structure's begin
and ending at or beyond the bounding Feature Structure's end
Requires an Annotation Index.
|
Stream<T> |
distinct() |
Stream<T> |
filter(Predicate<? super T> predicate) |
Optional<T> |
findAny() |
Optional<T> |
findFirst() |
<R> Stream<R> |
flatMap(Function<? super T,? extends Stream<? extends R>> mapper) |
DoubleStream |
flatMapToDouble(Function<? super T,? extends DoubleStream> mapper) |
IntStream |
flatMapToInt(Function<? super T,? extends IntStream> mapper) |
LongStream |
flatMapToLong(Function<? super T,? extends LongStream> mapper) |
SelectFSs<T> |
following(Annotation fs)
The methods below are alternatives
to the methods above, that combine
frequently used patterns into more
concise forms using positional arguments
|
SelectFSs<T> |
following(Annotation fs,
int offset)
For AnnotationIndex, position to first Annotation whose begin >= fs.getEnd()
and then adjust position by the offset
|
SelectFSs<T> |
following(int position)
Select
annotations that follow the specified document
position (i.e. |
SelectFSs<T> |
following(int position,
int offset)
For AnnotationIndex, position to first Annotation whose begin >= position
and then adjust position by the offset.
|
void |
forEach(Consumer<? super T> action)
This method is required, because the 2 interfaces inherited both define this
and this is needed to disambiguate
Otherwise, get a compile error (but not on Eclipse...)
|
void |
forEachOrdered(Consumer<? super T> action) |
FSIterator<T> |
fsIterator()
F S I t e r a t o r
-------------------
|
T |
get()
Get the first element or null if empty or the element at the first position is null.
|
T |
get(FeatureStructure fs)
Positions to the fs using moveTo(fs).
|
T |
get(FeatureStructure fs,
int offset)
Positions to the fs using moveTo(fs), followed by a shifted(offset).
|
T |
get(int offset)
Get the offset element or null if empty or the offset went outside the
the selected elements.
|
T |
get(int begin,
int end)
Position using a temporary Annotation with its begin and end set to the arguments.
|
T |
get(int begin,
int end,
int offset)
Position using a temporary Annotation with its begin and end set to the arguments,
followed by shifted(offset).
|
T |
get(TOP fs)
Positions to the fs using moveTo(fs).
|
T |
get(TOP fs,
int offset)
Positions to the fs using moveTo(fs), followed by a shifted(offset).
|
SelectFSs_impl<T> |
includeAnnotationsWithEndBeyondBounds()
Meaningful only for coveredBy, includes annotations where the end exceeds the bounding annotation's end.
|
SelectFSs_impl<T> |
includeAnnotationsWithEndBeyondBounds(boolean includeAnnotationsWithEndBeyondBounds)
Meaningful only for coveredBy, includes or filters out annotations where the end exceeds the bounding annotation's end.
|
SelectFSs_impl<T> |
index(FSIndex<T> aIndex) |
SelectFSs_impl<T> |
index(String indexName)
INDEX
If not specified, defaults to all FSs (orderNotNeeded) unless AnnotationIndex implied
|
boolean |
isEmpty() |
boolean |
isParallel() |
Iterator<T> |
iterator() |
SelectFSs_impl<T> |
limit(int alimit)
Limits the number of Feature Structures returned by this select
|
Stream<T> |
limit(long maxSize) |
<R> Stream<R> |
map(Function<? super T,? extends R> mapper) |
DoubleStream |
mapToDouble(ToDoubleFunction<? super T> mapper) |
IntStream |
mapToInt(ToIntFunction<? super T> mapper) |
LongStream |
mapToLong(ToLongFunction<? super T> mapper) |
Optional<T> |
max(Comparator<? super T> comparator) |
Optional<T> |
min(Comparator<? super T> comparator) |
boolean |
noneMatch(Predicate<? super T> predicate) |
SelectFSs_impl<T> |
nonOverlapping()
Filters while iterating
|
SelectFSs_impl<T> |
nonOverlapping(boolean bNonOverlapping)
Meaningful only for Annotation Indexes, specifies that iteration should or should not return
only annotations which don't overlap with each other.
|
SelectFSs_impl<T> |
nullOK()
Applies to the various argument forms of the get and single methods.
|
SelectFSs_impl<T> |
nullOK(boolean bNullOk)
Applies to the various argument forms of the get and single methods.
|
Stream<T> |
onClose(Runnable closeHandler) |
SelectFSs_impl<T> |
orderNotNeeded()
Specifies that order is not required while iterating over an otherwise ordered index.
|
SelectFSs_impl<T> |
orderNotNeeded(boolean bUnordered)
Specifies that order is or is not required while iterating over an otherwise ordered index.
|
Stream<T> |
parallel() |
Stream<T> |
peek(Consumer<? super T> action) |
SelectFSs<T> |
preceding(Annotation fs)
For AnnotationIndex, set up a selection that will go from the beginning to
the first Annotation to the left of the specified position,
whose end <= fs.getBegin().
|
SelectFSs<T> |
preceding(Annotation annotation,
int offset)
For AnnotationIndex, set up a selection that will go from the beginning to
the first Annotation to the left of the specified position,
ending at the last Annotation whose end <= fs.getBegin(),
after adjusting by offset items.
|
SelectFSs<T> |
preceding(int position)
Select
annotations that precede the specified document
position (i.e. |
SelectFSs<T> |
preceding(int position,
int offset)
For AnnotationIndex, set up a selection that will go from the beginning to
the first Annotation to the left of the specified position,
ending at the last Annotation whose end <= position.
|
Optional<T> |
reduce(BinaryOperator<T> accumulator) |
T |
reduce(T identity,
BinaryOperator<T> accumulator) |
<U> U |
reduce(U identity,
BiFunction<U,? super T,U> accumulator,
BinaryOperator<U> combiner) |
Stream<T> |
sequential() |
SelectFSs_impl<T> |
shifted(int shiftAmount)
starting position
|
T |
single() |
T |
single(FeatureStructure fs)
Positions to the fs using moveTo(fs).
|
T |
single(FeatureStructure fs,
int offset)
Positions to the fs using moveTo(fs), followed by a shifted(offset).
|
T |
single(int offset)
Get the offset element or null if empty or the offset went outside the
the selected elements.
|
T |
single(int begin,
int end)
Position using a temporary Annotation with its begin and end set to the arguments.
|
T |
single(int begin,
int end,
int offset)
Position using a temporary Annotation with its begin and end set to the arguments,
followed by shifted(offset).
|
T |
single(TOP fs)
Positions to the fs using moveTo(fs).
|
T |
single(TOP fs,
int offset)
Positions to the fs using moveTo(fs), followed by a shifted(offset).
|
T |
singleOrNull() |
T |
singleOrNull(FeatureStructure fs)
Positions to the fs using moveTo(fs).
|
T |
singleOrNull(FeatureStructure fs,
int offset)
Positions to the fs using moveTo(fs), followed by a shifted(offset).
|
T |
singleOrNull(int offset)
Get the offset element or null if empty or the offset went outside the
the selected elements.
|
T |
singleOrNull(int begin,
int end)
Position using a temporary Annotation with its begin and end set to the arguments.
|
T |
singleOrNull(int begin,
int end,
int offset)
Position using a temporary Annotation with its begin and end set to the arguments,
followed by shifted(offset).
|
T |
singleOrNull(TOP fs)
Positions to the fs using moveTo(fs).
|
T |
singleOrNull(TOP fs,
int offset)
Positions to the fs using moveTo(fs), followed by a shifted(offset).
|
Stream<T> |
skip(long n) |
SelectFSs<T> |
skipWhenSameBeginEndType()
boolean operations
|
Stream<T> |
sorted() |
Stream<T> |
sorted(Comparator<? super T> comparator) |
Spliterator<T> |
spliterator()
Iterator respects backwards
Sets the characteristics from the context:
IMMUTABLE / NONNULL / DISTINCT - always
CONCURRENT - never
ORDERED - unless orderNotNeeded index or not SORTED_INDEX or SET_INDEX
SORTED - only for SORTED_INDEX (and not orderNotNeeded?)
SIZED - if exact size is (easily) known, just from index.
|
SelectFSs_impl<T> |
startAt(FeatureStructure fs)
Starting Position specification - For ordered sources, specifies which FS to start at.
|
SelectFSs_impl<T> |
startAt(FeatureStructure fs,
int offset)
Starting Position specification - A combination of startAt followed by a shift
Requires an ordered index not necessarily AnnotationIndex, not necessarily sorted
This versions avoids a runtime cast check.
|
SelectFSs_impl<T> |
startAt(int begin)
Starting Position specification - For Annotation Indexes, specifies which FS to start at.
|
SelectFSs_impl<T> |
startAt(int begin,
int end)
Starting Position specification - For Annotation Indexes, specifies which FS to start at.
|
SelectFSs_impl<T> |
startAt(int begin,
int end,
int offset)
Starting Position specification - A combination of startAt followed by a shift
Requires an Annotation Index.
|
SelectFSs_impl<T> |
startAt(TOP fs)
Starting Position specification - For ordered sources, specifies which FS to start at.
|
SelectFSs_impl<T> |
startAt(TOP fs,
int offset)
Starting Position specification - A combination of startAt followed by a shift
Requires an ordered index not necessarily AnnotationIndex, not necessarily sorted
|
Object[] |
toArray() |
<A> A[] |
toArray(IntFunction<A[]> generator) |
<N extends T> |
type(Class<N> jcasClass_dot_class) |
<N extends T> |
type(int jcasClass_dot_type) |
<N extends T> |
type(String fullyQualifiedTypeName) |
<N extends T> |
type(Type uimaType) |
SelectFSs<T> |
typePriority()
Specify that type priority should be included when comparing two Feature Structures
when moving to the leftmost among otherwise equal items for moveTo(fs).
|
SelectFSs<T> |
typePriority(boolean aTypePriority)
Specify that type priority should or should not be included when comparing two Feature Structures while positioning an iterator
|
Stream<T> |
unordered() |
SelectFSs<T> |
useAnnotationEquals(boolean useAnnotationEquals)
Meaningful only for coveredBy: if true, then returned annotations are compared
to the bounding annotation
using the specified kind of equal comparison,
and if equal, they are skipped.
|
public SelectFSs_impl(CAS cas)
public SelectFSs_impl(FSArray source)
public SelectFSs_impl(FeatureStructure[] source, CAS cas)
public SelectFSs_impl(FSList source)
public SelectFSs_impl<T> index(String indexName)
indexName - -public SelectFSs_impl<T> index(FSIndex<T> aIndex)
public <N extends T> SelectFSs_impl<N> type(Type uimaType)
public <N extends T> SelectFSs_impl<N> type(String fullyQualifiedTypeName)
public <N extends T> SelectFSs_impl<N> type(int jcasClass_dot_type)
public <N extends T> SelectFSs_impl<N> type(Class<N> jcasClass_dot_class)
public SelectFSs<T> typePriority()
SelectFSsDefault is to not include type priority.
typePriority in interface SelectFSs<T extends FeatureStructure>public SelectFSs<T> typePriority(boolean aTypePriority)
SelectFSsDefault is to not include type priority.
typePriority in interface SelectFSs<T extends FeatureStructure>aTypePriority - if true says to include the type prioritypublic SelectFSs<T> skipWhenSameBeginEndType()
skipWhenSameBeginEndType in interface SelectFSs<T extends FeatureStructure>public SelectFSs<T> useAnnotationEquals(boolean useAnnotationEquals)
SelectFSsDefault is to use feature structure identity comparison (same id()s), not equals, when doing the test to see if an annotation should be skipped.
useAnnotationEquals in interface SelectFSs<T extends FeatureStructure>useAnnotationEquals - if true, use equals, if false, use id() ==.public SelectFSs_impl<T> nonOverlapping()
nonOverlapping in interface SelectFSs<T extends FeatureStructure>public SelectFSs_impl<T> nonOverlapping(boolean bNonOverlapping)
SelectFSsDefault is to not have this filter.
nonOverlapping in interface SelectFSs<T extends FeatureStructure>bNonOverlapping - true to specify filtering for only non-overlapping annotations.public SelectFSs_impl<T> includeAnnotationsWithEndBeyondBounds()
SelectFSsDefault is to NOT include annotations whose end exceeds the bounding annotation's end.
includeAnnotationsWithEndBeyondBounds in interface SelectFSs<T extends FeatureStructure>public SelectFSs_impl<T> includeAnnotationsWithEndBeyondBounds(boolean includeAnnotationsWithEndBeyondBounds)
SelectFSsDefault is to NOT include annotations whose end exceeds the bounding annotation's end.
includeAnnotationsWithEndBeyondBounds in interface SelectFSs<T extends FeatureStructure>includeAnnotationsWithEndBeyondBounds - false to filter out annotations whose end exceeds the bounding annotation's endpublic SelectFSs_impl<T> allViews()
allViews in interface SelectFSs<T extends FeatureStructure>public SelectFSs_impl<T> allViews(boolean bAllViews)
SelectFSsDefault is that the selection is just for one CAS view
allViews in interface SelectFSs<T extends FeatureStructure>bAllViews - true to extend the selection.public SelectFSs_impl<T> nullOK()
SelectFSsCalling this method is equivalent to nullOK(true). If never called, nulls are not OK by default.
nullOK in interface SelectFSs<T extends FeatureStructure>public SelectFSs_impl<T> nullOK(boolean bNullOk)
SelectFSsDefault: null is not OK as a value
nullOK in interface SelectFSs<T extends FeatureStructure>bNullOk - true if null is an ok value.public SelectFSs_impl<T> orderNotNeeded()
SelectFSsDefault: order is required by default, when iterating over an ordered index.
orderNotNeeded in interface SelectFSs<T extends FeatureStructure>public SelectFSs_impl<T> orderNotNeeded(boolean bUnordered)
SelectFSsDefault: order is required by default, when iterating over an ordered index.
orderNotNeeded in interface SelectFSs<T extends FeatureStructure>bUnordered - true means order is not needed.public SelectFSs_impl<T> backwards()
SelectFSsbackwards in interface SelectFSs<T extends FeatureStructure>public SelectFSs_impl<T> backwards(boolean bBackwards)
SelectFSsbackwards in interface SelectFSs<T extends FeatureStructure>bBackwards - true to run in reverse orderpublic SelectFSs_impl<T> shifted(int shiftAmount)
shifted in interface SelectFSs<T extends FeatureStructure>shiftAmount - the amount to shift; this many Feature Structures which
normally would be returned are instead skipped.public SelectFSs_impl<T> startAt(FeatureStructure fs)
SelectFSsstartAt in interface SelectFSs<T extends FeatureStructure>fs - a Feature Structure specifying a starting position.public SelectFSs_impl<T> startAt(TOP fs)
SelectFSsstartAt in interface SelectFSs<T extends FeatureStructure>fs - a Feature Structure specifying a starting position.public SelectFSs_impl<T> startAt(int begin)
SelectFSsSelectFSs.typePriority() and turns type priorities off
implicitly. Do not turn type priorities back on.
Positions to the leftmost (if there are multiple equal ones) Annotation
whose begin is >= beginstartAt in interface SelectFSs<T extends FeatureStructure>begin - the begin boundpublic SelectFSs_impl<T> startAt(int begin, int end)
SelectFSsstartAt in interface SelectFSs<T extends FeatureStructure>begin - the begin boundend - the end boundpublic SelectFSs_impl<T> startAt(TOP fs, int offset)
SelectFSsstartAt in interface SelectFSs<T extends FeatureStructure>fs - a Feature Structure specifying a starting position.offset - the amount to shift; this many Feature Structures which
normally would be returned are instead skipped.public SelectFSs_impl<T> startAt(FeatureStructure fs, int offset)
SelectFSsstartAt in interface SelectFSs<T extends FeatureStructure>fs - a Feature Structure specifying a starting position.offset - the amount to shift; this many Feature Structures which
normally would be returned are instead skipped.public SelectFSs_impl<T> startAt(int begin, int end, int offset)
SelectFSsstartAt in interface SelectFSs<T extends FeatureStructure>begin - the begin boundend - the end boundoffset - the amount to shift; this many Feature Structures which
normally would be returned are instead skipped.public SelectFSs_impl<T> limit(int alimit)
SelectFSslimit in interface SelectFSs<T extends FeatureStructure>alimit - the maximum number of feature structures returned.
This must be a value >= 0.public SelectFSs_impl<T> coveredBy(AnnotationFS fs)
coveredBy in interface SelectFSs<T extends FeatureStructure>fs - specifies the bounds.public SelectFSs_impl<T> coveredBy(int begin, int end)
SelectFSscoveredBy in interface SelectFSs<T extends FeatureStructure>begin - the begin boundend - the end boundpublic SelectFSs_impl<T> covering(AnnotationFS fs)
SelectFSscovering in interface SelectFSs<T extends FeatureStructure>fs - specifies the bounds.public SelectFSs_impl<T> covering(int begin, int end)
SelectFSscovering in interface SelectFSs<T extends FeatureStructure>begin - the begin boundend - the end boundpublic SelectFSs_impl<T> between(AnnotationFS fs1, AnnotationFS fs2)
SelectFSsIf fs1 > fs2, they are swapped.
between in interface SelectFSs<T extends FeatureStructure>fs1 - the beginning boundfs2 - the ending boundpublic SelectFSs<T> at(AnnotationFS fs)
SelectFSsat in interface SelectFSs<T extends FeatureStructure>fs - specifies the bounds.public SelectFSs<T> at(int begin, int end)
SelectFSsat in interface SelectFSs<T extends FeatureStructure>begin - the begin boundend - the end boundpublic FSIterator<T> fsIterator()
fsIterator in interface SelectFSs<T extends FeatureStructure>public Iterator<T> iterator()
iterator in interface Iterable<T extends FeatureStructure>iterator in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>public ArrayList<T> asList()
asList in interface SelectFSs<T extends FeatureStructure>public T[] asArray(Class<? super T> clazz)
asArray in interface SelectFSs<T extends FeatureStructure>clazz - the class of the type of the elementspublic Spliterator<T> spliterator()
spliterator in interface Iterable<T extends FeatureStructure>spliterator in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>spliterator in interface SelectFSs<T extends FeatureStructure>public T get()
SelectFSsget in interface SelectFSs<T extends FeatureStructure>public T single()
single in interface SelectFSs<T extends FeatureStructure>public T singleOrNull()
singleOrNull in interface SelectFSs<T extends FeatureStructure>public T get(int offset)
SelectFSsIf nullOK is false, then throws CASRuntimeException if null would have been returned, or the selection is empty, or doesn't have enough elements to satisfy the positioning.
get in interface SelectFSs<T extends FeatureStructure>offset - the offset adjustment, positive or negative.public T single(int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive, reverse direction if offset is negative) then throw an exception.
If nullOK is false, then throws CASRuntimeException if null would have been returned, or the selection is empty, or doesn't have enough elements to satisfy the positioning.
single in interface SelectFSs<T extends FeatureStructure>offset - the offset adjustment, positive or negative.public T singleOrNull(int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive, reverse direction if offset is negative) then throw an exception.
singleOrNull in interface SelectFSs<T extends FeatureStructure>offset - the offset adjustment, positive or negative.public T get(TOP fs)
SelectFSsget in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structurepublic T get(FeatureStructure fs)
SelectFSsget in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structurepublic T single(TOP fs)
SelectFSssingle in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structurepublic T single(FeatureStructure fs)
SelectFSssingle in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structurepublic T singleOrNull(TOP fs)
SelectFSssingleOrNull in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structurepublic T singleOrNull(FeatureStructure fs)
SelectFSssingleOrNull in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structurepublic T get(TOP fs, int offset)
SelectFSsget in interface SelectFSs<T extends FeatureStructure>fs - where to move tooffset - the offset move after positioning to fs, may be 0 or positive or negativepublic T get(FeatureStructure fs, int offset)
SelectFSsget in interface SelectFSs<T extends FeatureStructure>fs - where to move tooffset - the offset move after positioning to fs, may be 0 or positive or negativepublic T single(TOP fs, int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive or 0, reverse direction if offset is negative) then throw an exception.
If nullOK is false, then throws CASRuntimeException if null would have been returned. This versions avoids a runtime cast check.
single in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structureoffset - the offset adjustment, positive or negative.public T single(FeatureStructure fs, int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive or 0, reverse direction if offset is negative) then throw an exception.
If nullOK is false, then throws CASRuntimeException if null would have been returned.
single in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structureoffset - the offset adjustment, positive or negative.public T singleOrNull(TOP fs, int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive or 0, reverse direction if offset is negative) then throw an exception.
This versions avoids a runtime cast check.
singleOrNull in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structureoffset - the offset adjustment, positive or negative.public T singleOrNull(FeatureStructure fs, int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive or 0, reverse direction if offset is negative) then throw an exception.
singleOrNull in interface SelectFSs<T extends FeatureStructure>fs - the positioning Feature Structureoffset - the offset adjustment, positive or negative.public T get(int begin, int end)
SelectFSsget in interface SelectFSs<T extends FeatureStructure>begin - the begin position of the temporary Annotationend - the end position of the temporary Annotationpublic T single(int begin, int end)
SelectFSsIf, after positioning, there is another element following the one being returned then throw an exception.
if nullOK is false, then throws CASRuntimeException if null would have been returned.
single in interface SelectFSs<T extends FeatureStructure>begin - the begin position of the temporary Annotationend - the end position of the temporary Annotationpublic T singleOrNull(int begin, int end)
SelectFSsIf, after positioning, there is another element following the one being returned then throw an exception.
singleOrNull in interface SelectFSs<T extends FeatureStructure>begin - the begin position of the temporary Annotationend - the end position of the temporary Annotationpublic T get(int begin, int end, int offset)
SelectFSsget in interface SelectFSs<T extends FeatureStructure>begin - the begin position of the temporary Annotationend - the end position of the temporary Annotationoffset - the amount (positive or negative or 0) passed as an argument to shifted(int)public T single(int begin, int end, int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive or 0, reverse direction if offset is negative) then throw an exception.
single in interface SelectFSs<T extends FeatureStructure>begin - the begin position of the temporary Annotationend - the end position of the temporary Annotationoffset - the amount (positive or negative or 0) passed as an argument to shifted(int)public T singleOrNull(int begin, int end, int offset)
SelectFSsIf, after positioning, there is another element next to the one being returned (in the forward direction if offset is positive or 0, reverse direction if offset is negative) then throw an exception.
singleOrNull in interface SelectFSs<T extends FeatureStructure>begin - the begin position of the temporary Annotationend - the end position of the temporary Annotationoffset - the amount (positive or negative or 0) passed as an argument to shifted(int)public SelectFSs<T> following(Annotation fs)
following in interface SelectFSs<T extends FeatureStructure>fs - the Annotation to followpublic SelectFSs<T> following(int position)
SelectFSsannotations that follow the specified document
position (i.e. character offset). This is equivalent to performing a
following(new Annotation(jcas, 0, position), so all annotations starting at
position or after are returned, including zero-width annotations.following in interface SelectFSs<T extends FeatureStructure>position - start following this positionpublic SelectFSs<T> following(Annotation fs, int offset)
SelectFSsfollowing in interface SelectFSs<T extends FeatureStructure>fs - start following this Annotation, adjusted for the offsetoffset - positive or negative shift amount to adjust starting positionpublic SelectFSs<T> following(int position, int offset)
SelectFSsfollowing in interface SelectFSs<T extends FeatureStructure>position - start following this position, adjusted for the offsetoffset - positive or negative shift amount to adjust starting positionpublic SelectFSs<T> preceding(Annotation fs)
SelectFSspreceding in interface SelectFSs<T extends FeatureStructure>fs - the Annotation to use as the position to start before.public SelectFSs<T> preceding(int position)
SelectFSsannotations that precede the specified document
position (i.e. character offset). This is equivalent to performing a
preceding(new Annotation(jcas, position, Integer.MAX_VALUE), so all annotations
ending at position or before are returned, including zero-width annotations.preceding in interface SelectFSs<T extends FeatureStructure>position - start following this positionpublic SelectFSs<T> preceding(Annotation annotation, int offset)
SelectFSspreceding in interface SelectFSs<T extends FeatureStructure>annotation - the Annotation to use as the position to start before.offset - the offset adjustment, positive or negative. Positive moves backwards.public SelectFSs<T> preceding(int position, int offset)
SelectFSspreceding in interface SelectFSs<T extends FeatureStructure>position - the position to start before.offset - the offset adjustment, positive or negative. Positive moves backwards.public Stream<T> filter(Predicate<? super T> predicate)
filter in interface Stream<T extends FeatureStructure>public <R> Stream<R> map(Function<? super T,? extends R> mapper)
map in interface Stream<T extends FeatureStructure>public IntStream mapToInt(ToIntFunction<? super T> mapper)
mapToInt in interface Stream<T extends FeatureStructure>public LongStream mapToLong(ToLongFunction<? super T> mapper)
mapToLong in interface Stream<T extends FeatureStructure>public DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper)
mapToDouble in interface Stream<T extends FeatureStructure>public <R> Stream<R> flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
flatMap in interface Stream<T extends FeatureStructure>public IntStream flatMapToInt(Function<? super T,? extends IntStream> mapper)
flatMapToInt in interface Stream<T extends FeatureStructure>public LongStream flatMapToLong(Function<? super T,? extends LongStream> mapper)
flatMapToLong in interface Stream<T extends FeatureStructure>public DoubleStream flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
flatMapToDouble in interface Stream<T extends FeatureStructure>public Stream<T> distinct()
distinct in interface Stream<T extends FeatureStructure>public Stream<T> sorted()
sorted in interface Stream<T extends FeatureStructure>public Stream<T> sorted(Comparator<? super T> comparator)
sorted in interface Stream<T extends FeatureStructure>public Stream<T> peek(Consumer<? super T> action)
peek in interface Stream<T extends FeatureStructure>public Stream<T> limit(long maxSize)
limit in interface Stream<T extends FeatureStructure>public Stream<T> skip(long n)
skip in interface Stream<T extends FeatureStructure>public void forEach(Consumer<? super T> action)
SelectFSsforEach in interface Iterable<T extends FeatureStructure>forEach in interface Stream<T extends FeatureStructure>forEach in interface SelectFSs<T extends FeatureStructure>public void forEachOrdered(Consumer<? super T> action)
forEachOrdered in interface Stream<T extends FeatureStructure>public Object[] toArray()
toArray in interface Stream<T extends FeatureStructure>public <A> A[] toArray(IntFunction<A[]> generator)
toArray in interface Stream<T extends FeatureStructure>public T reduce(T identity, BinaryOperator<T> accumulator)
reduce in interface Stream<T extends FeatureStructure>public Optional<T> reduce(BinaryOperator<T> accumulator)
reduce in interface Stream<T extends FeatureStructure>public <U> U reduce(U identity,
BiFunction<U,? super T,U> accumulator,
BinaryOperator<U> combiner)
reduce in interface Stream<T extends FeatureStructure>public <R> R collect(Supplier<R> supplier, BiConsumer<R,? super T> accumulator, BiConsumer<R,R> combiner)
collect in interface Stream<T extends FeatureStructure>public <R,A> R collect(Collector<? super T,A,R> collector)
collect in interface Stream<T extends FeatureStructure>public Optional<T> min(Comparator<? super T> comparator)
min in interface Stream<T extends FeatureStructure>public Optional<T> max(Comparator<? super T> comparator)
max in interface Stream<T extends FeatureStructure>public long count()
count in interface Stream<T extends FeatureStructure>public boolean anyMatch(Predicate<? super T> predicate)
anyMatch in interface Stream<T extends FeatureStructure>public boolean allMatch(Predicate<? super T> predicate)
allMatch in interface Stream<T extends FeatureStructure>public boolean noneMatch(Predicate<? super T> predicate)
noneMatch in interface Stream<T extends FeatureStructure>public Optional<T> findFirst()
findFirst in interface Stream<T extends FeatureStructure>public Optional<T> findAny()
findAny in interface Stream<T extends FeatureStructure>public boolean isParallel()
isParallel in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>public Stream<T> sequential()
sequential in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>public Stream<T> parallel()
parallel in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>public Stream<T> onClose(Runnable closeHandler)
onClose in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>public void close()
close in interface AutoCloseableclose in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>public Stream<T> unordered()
unordered in interface BaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>public boolean isEmpty()
isEmpty in interface SelectFSs<T extends FeatureStructure>Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.