Class SelectFSs_impl<T extends FeatureStructure>
- All Implemented Interfaces:
AutoCloseable,Iterable<T>,BaseStream<T,,Stream<T>> Stream<T>,SelectFSs<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.stream.Stream
Stream.Builder<T extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionSelectFSs_impl(CAS cas) SelectFSs_impl(FeatureStructure[] source, CAS cas) SelectFSs_impl(FSArray source) SelectFSs_impl(FSList source) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallViews()MiscellaneousallViews(boolean bAllViews) Extend or not extend the selection to be over all the CAS views, not just a single view.boolean<N extends T>
SelectFSs_impl<N>anyType()Select the index's uppermost type.T[]asList()at(int begin, int end) Subselection - specifies selecting Feature Structures having the same begin and end Requires an Annotation Index.at(AnnotationFS fs) Subselection - specifies selecting Feature Structures having the same begin and end - influenced by typePriority, positionUsesType, and useAnnotationEquals Requires an Annotation Index.Specifies that the iteration should run in reverse order from normal.backwards(boolean bBackwards) Specifies that the iteration should run in the normal or reverse order.between(AnnotationFS fs1, AnnotationFS fs2) Subselection - specifies selecting Feature Structures which lie between two annotations.voidclose()<R> Rcollect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) <R,A> R longcount()coveredBy(int begin, int end) Subselection - specifies selecting Feature Structures starting (and maybe ending) within a bounding Feature Structure Requires an Annotation Index.subselection based on boundingFscovering(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.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.distinct()findAny()<R> Stream<R>flatMapToDouble(Function<? super T, ? extends DoubleStream> mapper) flatMapToInt(Function<? super T, ? extends IntStream> mapper) flatMapToLong(Function<? super T, ? extends LongStream> mapper) following(int position) Selectannotationsthat follow the specified document position (i.e.following(int position, int offset) For AnnotationIndex, position to first Annotation whose begin >= position and then adjust position by the offset.following(Annotation fs) For AnnotationIndex, position to first Annotation whose begin >= fs.getEnd();following(Annotation fs, int offset) For AnnotationIndex, position to first Annotation whose begin >= fs.getEnd() and then adjust position by the offsetvoidThis 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...)voidforEachOrdered(Consumer<? super T> action) F S I t e r a t o r -------------------get()Get the first element or null if empty or the element at the first position is null.get(int offset) Get the offset element or null if empty or the offset went outside the the selected elements.get(int begin, int end) Position using a temporary Annotation with its begin and end set to the arguments.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).get(FeatureStructure fs) Positions to the fs using moveTo(fs).get(FeatureStructure fs, int offset) Positions to the fs using moveTo(fs), followed by a shifted(offset).Positions to the fs using moveTo(fs).Positions to the fs using moveTo(fs), followed by a shifted(offset).Meaningful only for coveredBy, includes annotations where the end exceeds the bounding annotation's end.includeAnnotationsWithEndBeyondBounds(boolean includeAnnotationsWithEndBeyondBounds) Meaningful only for coveredBy, includes or filters out annotations where the end exceeds the bounding annotation's end.INDEX If not specified, defaults to all FSs (orderNotNeeded) unless AnnotationIndex impliedbooleanisEmpty()booleaniterator()limit(int alimit) Limits the number of Feature Structures returned by this selectlimit(long maxSize) <R> Stream<R>mapToDouble(ToDoubleFunction<? super T> mapper) mapToInt(ToIntFunction<? super T> mapper) mapToLong(ToLongFunction<? super T> mapper) max(Comparator<? super T> comparator) min(Comparator<? super T> comparator) booleanFilters while iteratingnonOverlapping(boolean bNonOverlapping) Meaningful only for Annotation Indexes, specifies that iteration should or should not return only annotations which don't overlap with each other.nullOK()Applies to the various argument forms of the get and single methods.nullOK(boolean bNullOk) Applies to the various argument forms of the get and single methods.Specifies that order is not required while iterating over an otherwise ordered index.orderNotNeeded(boolean bUnordered) Specifies that order is or is not required while iterating over an otherwise ordered index.parallel()preceding(int position) Selectannotationsthat precede the specified document position (i.e.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.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().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.reduce(BinaryOperator<T> accumulator) reduce(T identity, BinaryOperator<T> accumulator) <U> Ureduce(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) shifted(int shiftAmount) starting positionsingle()single(int offset) Get the offset element or null if empty or the offset went outside the the selected elements.single(int begin, int end) Position using a temporary Annotation with its begin and end set to the arguments.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).Positions to the fs using moveTo(fs).single(FeatureStructure fs, int offset) Positions to the fs using moveTo(fs), followed by a shifted(offset).Positions to the fs using moveTo(fs).Positions to the fs using moveTo(fs), followed by a shifted(offset).singleOrNull(int offset) Get the offset element or null if empty or the offset went outside the the selected elements.singleOrNull(int begin, int end) Position using a temporary Annotation with its begin and end set to the arguments.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).Positions to the fs using moveTo(fs).singleOrNull(FeatureStructure fs, int offset) Positions to the fs using moveTo(fs), followed by a shifted(offset).singleOrNull(TOP fs) Positions to the fs using moveTo(fs).singleOrNull(TOP fs, int offset) Positions to the fs using moveTo(fs), followed by a shifted(offset).skip(long n) boolean operationssorted()sorted(Comparator<? super T> comparator) 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.startAt(int begin) Starting Position specification - For Annotation Indexes, specifies which FS to start at.startAt(int begin, int end) Starting Position specification - For Annotation Indexes, specifies which FS to start at.startAt(int begin, int end, int offset) Starting Position specification - A combination of startAt followed by a shift Requires an Annotation Index.Starting Position specification - For ordered sources, specifies which FS to start at.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.Starting Position specification - For ordered sources, specifies which FS to start at.Starting Position specification - A combination of startAt followed by a shift Requires an ordered index not necessarily AnnotationIndex, not necessarily sortedObject[]toArray()<A> A[]toArray(IntFunction<A[]> generator) <N extends T>
SelectFSs_impl<N>type(int jcasClass_dot_type) <N extends T>
SelectFSs_impl<N><N extends T>
SelectFSs_impl<N><N extends T>
SelectFSs_impl<N>Specify that type priority should be included when comparing two Feature Structures when moving to the leftmost among otherwise equal items for moveTo(fs).typePriority(boolean aTypePriority) Specify that type priority should or should not be included when comparing two Feature Structures while positioning an iteratoruseAnnotationEquals(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.stream.Stream
dropWhile, mapMulti, mapMultiToDouble, mapMultiToInt, mapMultiToLong, takeWhile, toList
-
Constructor Details
-
SelectFSs_impl
-
SelectFSs_impl
-
SelectFSs_impl
-
SelectFSs_impl
-
-
Method Details
-
index
INDEX If not specified, defaults to all FSs (orderNotNeeded) unless AnnotationIndex implied- Parameters:
indexName- -- Returns:
- -
-
index
-
anyType
Select the index's uppermost type. -
type
-
type
-
type
-
type
-
typePriority
Description copied from interface:SelectFSsSpecify that type priority should be included when comparing two Feature Structures when moving to the leftmost among otherwise equal items for moveTo(fs).Default is to not include type priority.
- Specified by:
typePriorityin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
typePriority
Description copied from interface:SelectFSsSpecify that type priority should or should not be included when comparing two Feature Structures while positioning an iteratorDefault is to not include type priority.
- Specified by:
typePriorityin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
aTypePriority- if true says to include the type priority- Returns:
- the updated SelectFSs object
-
skipWhenSameBeginEndType
boolean operations- Specified by:
skipWhenSameBeginEndTypein interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
useAnnotationEquals
Description copied from interface:SelectFSsMeaningful 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.Default is to use feature structure identity comparison (same id()s), not equals, when doing the test to see if an annotation should be skipped.
- Specified by:
useAnnotationEqualsin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
useAnnotationEquals- if true, use equals, if false, use id() ==.- Returns:
- the updated SelectFSs object
-
nonOverlapping
Filters while iterating- Specified by:
nonOverlappingin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
nonOverlapping
Description copied from interface:SelectFSsMeaningful only for Annotation Indexes, specifies that iteration should or should not return only annotations which don't overlap with each other. Also known as "unambiguous".Default is to not have this filter.
- Specified by:
nonOverlappingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
bNonOverlapping- true to specify filtering for only non-overlapping annotations.- Returns:
- the updated SelectFSs object
-
includeAnnotationsWithEndBeyondBounds
Description copied from interface:SelectFSsMeaningful only for coveredBy, includes annotations where the end exceeds the bounding annotation's end.Default is to NOT include annotations whose end exceeds the bounding annotation's end.
- Specified by:
includeAnnotationsWithEndBeyondBoundsin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
includeAnnotationsWithEndBeyondBounds
public SelectFSs_impl<T> includeAnnotationsWithEndBeyondBounds(boolean includeAnnotationsWithEndBeyondBounds) Description copied from interface:SelectFSsMeaningful only for coveredBy, includes or filters out annotations where the end exceeds the bounding annotation's end.Default is to NOT include annotations whose end exceeds the bounding annotation's end.
- Specified by:
includeAnnotationsWithEndBeyondBoundsin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
includeAnnotationsWithEndBeyondBounds- false to filter out annotations whose end exceeds the bounding annotation's end- Returns:
- the updated SelectFSs object
-
allViews
Miscellaneous- Specified by:
allViewsin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
allViews
Description copied from interface:SelectFSsExtend or not extend the selection to be over all the CAS views, not just a single view.Default is that the selection is just for one CAS view
- Specified by:
allViewsin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
bAllViews- true to extend the selection.- Returns:
- the updated SelectFSs object
-
nullOK
Description copied from interface:SelectFSsApplies to the various argument forms of the get and single methods. Indicates that a null value should not throw an exception.Calling this method is equivalent to nullOK(true). If never called, nulls are not OK by default.
- Specified by:
nullOKin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
nullOK
Description copied from interface:SelectFSsApplies to the various argument forms of the get and single methods. Indicates that a null value should or should not throw an exception.Default: null is not OK as a value
- Specified by:
nullOKin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
bNullOk- true if null is an ok value.- Returns:
- the updated SelectFSs object
-
orderNotNeeded
Description copied from interface:SelectFSsSpecifies that order is not required while iterating over an otherwise ordered index. This can be a performance boost for hierarchically nested types.Default: order is required by default, when iterating over an ordered index.
- Specified by:
orderNotNeededin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
orderNotNeeded
Description copied from interface:SelectFSsSpecifies that order is or is not required while iterating over an otherwise ordered index. This can be a performance boost for hierarchically nested types.Default: order is required by default, when iterating over an ordered index.
- Specified by:
orderNotNeededin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
bUnordered- true means order is not needed.- Returns:
- the updated SelectFSs object
-
backwards
Description copied from interface:SelectFSsSpecifies that the iteration should run in reverse order from normal. Note that this does not compose; two calls to this will still result in the iteration running in reverse order.- Specified by:
backwardsin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the updated SelectFSs object
-
backwards
Description copied from interface:SelectFSsSpecifies that the iteration should run in the normal or reverse order. Note that this does not compose.- Specified by:
backwardsin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
bBackwards- true to run in reverse order- Returns:
- the updated SelectFSs object
-
shifted
starting position- Specified by:
shiftedin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
shiftAmount- the amount to shift; this many Feature Structures which normally would be returned are instead skipped.- Returns:
- the updated SelectFSs object
-
startAt
Description copied from interface:SelectFSsStarting Position specification - For ordered sources, specifies which FS to start at. Requires an ordered index not necessarily AnnotationIndex, not necessarily sorted- Specified by:
startAtin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- a Feature Structure specifying a starting position.- Returns:
- the updated SelectFSs object
-
startAt
Description copied from interface:SelectFSsStarting Position specification - For ordered sources, specifies which FS to start at. Requires an ordered index not necessarily AnnotationIndex, not necessarily sorted- Specified by:
startAtin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- a Feature Structure specifying a starting position.- Returns:
- the updated SelectFSs object
-
startAt
Description copied from interface:SelectFSsStarting Position specification - For Annotation Indexes, specifies which FS to start at. This method is incompatible withSelectFSs.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 >= begin- Specified by:
startAtin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin bound- Returns:
- the updated SelectFSs object
-
startAt
Description copied from interface:SelectFSsStarting Position specification - For Annotation Indexes, specifies which FS to start at.- Specified by:
startAtin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin boundend- the end bound- Returns:
- the updated SelectFSs object
-
startAt
Description copied from interface:SelectFSsStarting Position specification - A combination of startAt followed by a shift Requires an ordered index not necessarily AnnotationIndex, not necessarily sorted- Specified by:
startAtin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
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.- Returns:
- the updated SelectFSs object
-
startAt
Description copied from interface:SelectFSsStarting 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.- Specified by:
startAtin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
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.- Returns:
- the updated SelectFSs object
-
startAt
Description copied from interface:SelectFSsStarting Position specification - A combination of startAt followed by a shift Requires an Annotation Index.- Specified by:
startAtin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin boundend- the end boundoffset- the amount to shift; this many Feature Structures which normally would be returned are instead skipped.- Returns:
- the updated SelectFSs object
-
limit
Description copied from interface:SelectFSsLimits the number of Feature Structures returned by this select- Specified by:
limitin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
alimit- the maximum number of feature structures returned. This must be a value >= 0.- Returns:
- the updated SelectFSs object
-
coveredBy
subselection based on boundingFs- Specified by:
coveredByin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- specifies the bounds.- Returns:
- the updated SelectFSs object
-
coveredBy
Description copied from interface:SelectFSsSubselection - specifies selecting Feature Structures starting (and maybe ending) within a bounding Feature Structure Requires an Annotation Index.- Specified by:
coveredByin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin boundend- the end bound- Returns:
- the updated SelectFSs object
-
covering
Description copied from interface:SelectFSsSubselection - 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.- Specified by:
coveringin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- specifies the bounds.- Returns:
- the updated SelectFSs object
-
covering
Description copied from interface:SelectFSsSubselection - 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.- Specified by:
coveringin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin boundend- the end bound- Returns:
- the updated SelectFSs object
-
between
Description copied from interface:SelectFSsSubselection - specifies selecting Feature Structures which lie between two annotations. A bounding Annotation is constructed whose begin is the end of fs1, and whose end is the begin of fs2. Requires an Annotation Index.If fs1 > fs2, they are swapped.
- Specified by:
betweenin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs1- the beginning boundfs2- the ending bound- Returns:
- the updated SelectFSs object
-
at
Description copied from interface:SelectFSsSubselection - specifies selecting Feature Structures having the same begin and end - influenced by typePriority, positionUsesType, and useAnnotationEquals Requires an Annotation Index.- Specified by:
atin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- specifies the bounds.- Returns:
- the updated SelectFSs object
-
at
Description copied from interface:SelectFSsSubselection - specifies selecting Feature Structures having the same begin and end Requires an Annotation Index. - influenced by typePriority, positionUsesType, and useAnnotationEquals- Specified by:
atin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin boundend- the end bound- Returns:
- the updated SelectFSs object
-
fsIterator
F S I t e r a t o r -------------------- Specified by:
fsIteratorin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- an FSIterator over the selection. The iterator is set up depending on preceding configuration calls to this SelectFSs instance.
-
iterator
- Specified by:
iteratorin interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>> - Specified by:
iteratorin interfaceIterable<T extends FeatureStructure>
-
asList
- Specified by:
asListin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- a List object whose elements represent the selection.
-
asArray
- Specified by:
asArrayin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
clazz- the class of the type of the elements- Returns:
- a Array object representation of the elements of the selection.
-
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. false if bounded, unambiguous SUBSIZED - if spliterator result from trysplit also is SIZED, set to true for now trySplit impl: always returns null (no parallelism support for now)- Specified by:
spliteratorin interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>> - Specified by:
spliteratorin interfaceIterable<T extends FeatureStructure>- Specified by:
spliteratorin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- the spliterator
-
get
Description copied from interface:SelectFSsGet the first element or null if empty or the element at the first position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned.- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- first element or null if empty
-
single
- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Returns:
- first element, verifying that the size of the selection is 1 (or maybe 0)
-
singleOrNull
- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- first element, which may be null, or null if selection is empty.
-
get
Description copied from interface:SelectFSsGet the offset element or null if empty or the offset went outside the the selected elements.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.
- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
offset- the offset adjustment, positive or negative.- Returns:
- the selected element or null
-
single
Description copied from interface:SelectFSsGet the offset element or null if empty or the offset went outside the the selected elements.If, 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.
- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Parameters:
offset- the offset adjustment, positive or negative.- Returns:
- the selected element or null
-
singleOrNull
Description copied from interface:SelectFSsGet the offset element or null if empty or the offset went outside the the selected elements.If, 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.
- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
offset- the offset adjustment, positive or negative.- Returns:
- the selected element or null
-
get
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs). Get the element at that position or null if empty or the element at that position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned. This versions avoids a runtime cast check.- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structure- Returns:
- first element or null if empty
-
get
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs). Get the element at that position or null if empty or the element at that position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned.- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structure- Returns:
- first element or null if empty
-
single
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs). Get the element at that position or null if empty or the element at that position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned. This versions avoids a runtime cast check.- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structure- Returns:
- first element or null if empty
-
single
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs). Get the element at that position or null if empty or the element at that position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned.- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structure- Returns:
- first element or null if empty
-
singleOrNull
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs). Get the element at that position or null if empty or the element at that position is null. This versions avoids a runtime cast check.- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structure- Returns:
- first element or null if empty
-
singleOrNull
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs). Get the element at that position or null if empty or the element at that position is null.- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structure- Returns:
- first element or null if empty
-
get
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs), followed by a shifted(offset). Gets the element at that position or null if empty or the element at that position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned. This versions avoids a runtime cast check.- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- where to move tooffset- the offset move after positioning to fs, may be 0 or positive or negative- Returns:
- the selected element or null if empty
-
get
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs), followed by a shifted(offset). Gets the element at that position or null if empty or the element at that position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned.- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- where to move tooffset- the offset move after positioning to fs, may be 0 or positive or negative- Returns:
- the selected element or null if empty
-
single
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs), followed by a shifted(offset). Gets the element at that position or null if empty or the element at that position is null.If, 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.
- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structureoffset- the offset adjustment, positive or negative.- Returns:
- the selected element or null if empty
-
single
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs), followed by a shifted(offset). Gets the element at that position or null if empty or the element at that position is null.If, 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.
- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structureoffset- the offset adjustment, positive or negative.- Returns:
- the selected element or null if empty
-
singleOrNull
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs), followed by a shifted(offset). Gets the element at that position or null if empty or the element at that position is null.If, 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.
- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structureoffset- the offset adjustment, positive or negative.- Returns:
- the selected element or null if empty
-
singleOrNull
Description copied from interface:SelectFSsPositions to the fs using moveTo(fs), followed by a shifted(offset). Gets the element at that position or null if empty or the element at that position is null.If, 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.
- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the positioning Feature Structureoffset- the offset adjustment, positive or negative.- Returns:
- the selected element or null if empty
-
get
Description copied from interface:SelectFSsPosition using a temporary Annotation with its begin and end set to the arguments. Gets the element at that position or null if empty or the element at that position is null. if nullOK is false, then throws CASRuntimeException if null would have been returned. This versions avoids a runtime cast check.- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin position of the temporary Annotationend- the end position of the temporary Annotation- Returns:
- the selected element or null if empty
-
single
Description copied from interface:SelectFSsPosition using a temporary Annotation with its begin and end set to the arguments. Gets the element at that position or null if empty or the element at that position is null.If, 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.
- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin position of the temporary Annotationend- the end position of the temporary Annotation- Returns:
- the selected element or null if empty
-
singleOrNull
Description copied from interface:SelectFSsPosition using a temporary Annotation with its begin and end set to the arguments. Gets the element at that position or null if empty or the element at that position is null.If, after positioning, there is another element following the one being returned then throw an exception.
- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
begin- the begin position of the temporary Annotationend- the end position of the temporary Annotation- Returns:
- the selected element or null if empty
-
get
Description copied from interface:SelectFSsPosition using a temporary Annotation with its begin and end set to the arguments, followed by shifted(offset). Gets the element at that position or null if empty or the element at that position is null.- Specified by:
getin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
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)- Returns:
- the selected element or null if empty
-
single
Description copied from interface:SelectFSsPosition using a temporary Annotation with its begin and end set to the arguments, followed by shifted(offset). Gets the element at that position or null if empty or the element at that position is null.If, 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.
- Specified by:
singlein interfaceSelectFSs<T extends FeatureStructure>- Parameters:
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)- Returns:
- the selected element or null if empty
-
singleOrNull
Description copied from interface:SelectFSsPosition using a temporary Annotation with its begin and end set to the arguments, followed by shifted(offset). Gets the element at that position or null if empty or the element at that position is null.If, 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.
- Specified by:
singleOrNullin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
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)- Returns:
- the selected element or null if empty
-
following
Description copied from interface:SelectFSsFor AnnotationIndex, position to first Annotation whose begin >= fs.getEnd();- Specified by:
followingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the Annotation to follow- Returns:
- the updated SelectFSs object
-
following
Description copied from interface:SelectFSsSelectannotationsthat follow the specified document position (i.e. character offset). This is equivalent to performing afollowing(new Annotation(jcas, 0, position), so all annotations starting atpositionor after are returned, including zero-width annotations.- Specified by:
followingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
position- start following this position- Returns:
- the updated SelectFSs object
-
following
Description copied from interface:SelectFSsFor AnnotationIndex, position to first Annotation whose begin >= fs.getEnd() and then adjust position by the offset- Specified by:
followingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- start following this Annotation, adjusted for the offsetoffset- positive or negative shift amount to adjust starting position- Returns:
- the updated SelectFSs object
-
following
Description copied from interface:SelectFSsFor AnnotationIndex, position to first Annotation whose begin >= position and then adjust position by the offset.- Specified by:
followingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
position- start following this position, adjusted for the offsetoffset- positive or negative shift amount to adjust starting position- Returns:
- the updated SelectFSs object
-
preceding
Description copied from interface:SelectFSsFor 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(). Annotations whose end > fs.getBegin() are skipped.- Specified by:
precedingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
fs- the Annotation to use as the position to start before.- Returns:
- the updated SelectFSs object
-
preceding
Description copied from interface:SelectFSsSelectannotationsthat precede the specified document position (i.e. character offset). This is equivalent to performing apreceding(new Annotation(jcas, position, Integer.MAX_VALUE), so all annotations ending atpositionor before are returned, including zero-width annotations.- Specified by:
precedingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
position- start following this position- Returns:
- the updated SelectFSs object
-
preceding
Description copied from interface:SelectFSsFor 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. Annotations whose end > fs.getBegin() are skipped (including during the offset positioning)- Specified by:
precedingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
annotation- the Annotation to use as the position to start before.offset- the offset adjustment, positive or negative. Positive moves backwards.- Returns:
- the updated SelectFSs object
-
preceding
Description copied from interface:SelectFSsFor 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. after adjusting by offset items. Annotations whose end > position are skipped (including during the offset positioning)- Specified by:
precedingin interfaceSelectFSs<T extends FeatureStructure>- Parameters:
position- the position to start before.offset- the offset adjustment, positive or negative. Positive moves backwards.- Returns:
- the updated SelectFSs object
-
filter
- Specified by:
filterin interfaceStream<T extends FeatureStructure>
-
map
- Specified by:
mapin interfaceStream<T extends FeatureStructure>
-
mapToInt
- Specified by:
mapToIntin interfaceStream<T extends FeatureStructure>
-
mapToLong
- Specified by:
mapToLongin interfaceStream<T extends FeatureStructure>
-
mapToDouble
- Specified by:
mapToDoublein interfaceStream<T extends FeatureStructure>
-
flatMap
- Specified by:
flatMapin interfaceStream<T extends FeatureStructure>
-
flatMapToInt
- Specified by:
flatMapToIntin interfaceStream<T extends FeatureStructure>
-
flatMapToLong
- Specified by:
flatMapToLongin interfaceStream<T extends FeatureStructure>
-
flatMapToDouble
- Specified by:
flatMapToDoublein interfaceStream<T extends FeatureStructure>
-
distinct
- Specified by:
distinctin interfaceStream<T extends FeatureStructure>
-
sorted
- Specified by:
sortedin interfaceStream<T extends FeatureStructure>
-
sorted
- Specified by:
sortedin interfaceStream<T extends FeatureStructure>
-
peek
- Specified by:
peekin interfaceStream<T extends FeatureStructure>
-
limit
- Specified by:
limitin interfaceStream<T extends FeatureStructure>
-
skip
- Specified by:
skipin interfaceStream<T extends FeatureStructure>
-
forEach
Description copied from interface:SelectFSsThis 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...)- Specified by:
forEachin interfaceIterable<T extends FeatureStructure>- Specified by:
forEachin interfaceSelectFSs<T extends FeatureStructure>- Specified by:
forEachin interfaceStream<T extends FeatureStructure>
-
forEachOrdered
- Specified by:
forEachOrderedin interfaceStream<T extends FeatureStructure>
-
toArray
- Specified by:
toArrayin interfaceStream<T extends FeatureStructure>
-
toArray
- Specified by:
toArrayin interfaceStream<T extends FeatureStructure>
-
reduce
- Specified by:
reducein interfaceStream<T extends FeatureStructure>
-
reduce
- Specified by:
reducein interfaceStream<T extends FeatureStructure>
-
reduce
- Specified by:
reducein interfaceStream<T extends FeatureStructure>
-
collect
public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) - Specified by:
collectin interfaceStream<T extends FeatureStructure>
-
collect
- Specified by:
collectin interfaceStream<T extends FeatureStructure>
-
min
- Specified by:
minin interfaceStream<T extends FeatureStructure>
-
max
- Specified by:
maxin interfaceStream<T extends FeatureStructure>
-
count
public long count()- Specified by:
countin interfaceStream<T extends FeatureStructure>
-
anyMatch
- Specified by:
anyMatchin interfaceStream<T extends FeatureStructure>
-
allMatch
- Specified by:
allMatchin interfaceStream<T extends FeatureStructure>
-
noneMatch
- Specified by:
noneMatchin interfaceStream<T extends FeatureStructure>
-
findFirst
- Specified by:
findFirstin interfaceStream<T extends FeatureStructure>
-
findAny
- Specified by:
findAnyin interfaceStream<T extends FeatureStructure>
-
isParallel
public boolean isParallel()- Specified by:
isParallelin interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>
-
sequential
- Specified by:
sequentialin interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>
-
parallel
- Specified by:
parallelin interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>
-
onClose
- Specified by:
onClosein interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>
-
unordered
- Specified by:
unorderedin interfaceBaseStream<T extends FeatureStructure,Stream<T extends FeatureStructure>>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceSelectFSs<T extends FeatureStructure>- Returns:
- true if the selection is empty
-