You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2016/12/23 21:51:31 UTC
svn commit: r1775915 - in /uima/uimaj/branches/experiment-v3-jcas:
uima-docbook-v3-users-guide/src/docbook/uv3.select.xml
uimaj-core/src/main/java/org/apache/uima/cas/SelectFSs.java
uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
Author: schor
Date: Fri Dec 23 21:51:31 2016
New Revision: 1775915
URL: http://svn.apache.org/viewvc?rev=1775915&view=rev
Log:
[UIMA-5238] rename method, update docs
Modified:
uima/uimaj/branches/experiment-v3-jcas/uima-docbook-v3-users-guide/src/docbook/uv3.select.xml
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SelectFSs.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
Modified: uima/uimaj/branches/experiment-v3-jcas/uima-docbook-v3-users-guide/src/docbook/uv3.select.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uima-docbook-v3-users-guide/src/docbook/uv3.select.xml?rev=1775915&r1=1775914&r2=1775915&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uima-docbook-v3-users-guide/src/docbook/uv3.select.xml (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uima-docbook-v3-users-guide/src/docbook/uv3.select.xml Fri Dec 23 21:51:31 2016
@@ -378,7 +378,7 @@ FSIterator<Token> token_iterator =
<variablelist>
<varlistentry>
- <term><emphasis role="strong">unordered</emphasis></term>
+ <term><emphasis role="strong">orderNotNeeded</emphasis></term>
<listitem>
<para>relaxes any iteration by allowing it to proceed in an unordered manner. Specifying
this may improve performance in some cases. When this is specified,
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SelectFSs.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SelectFSs.java?rev=1775915&r1=1775914&r2=1775915&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SelectFSs.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SelectFSs.java Fri Dec 23 21:51:31 2016
@@ -19,7 +19,6 @@
package org.apache.uima.cas;
-import java.util.Iterator;
import java.util.List;
import java.util.Spliterator;
import java.util.function.Consumer;
@@ -92,8 +91,8 @@ public interface SelectFSs<T extends Fea
SelectFSs<T> nullOK(); // applies to get()
SelectFSs<T> nullOK(boolean nullOk); // applies to get()
- SelectFSs<T> unordered(); // ignored if not ordered index
- SelectFSs<T> unordered(boolean unordered); // ignored if not ordered index
+ SelectFSs<T> orderNotNeeded(); // ignored if not ordered index
+ SelectFSs<T> orderNotNeeded(boolean unordered); // ignored if not ordered index
SelectFSs<T> backwards(); // ignored if not ordered index
SelectFSs<T> backwards(boolean backwards); // ignored if not ordered index
@@ -171,10 +170,10 @@ public interface SelectFSs<T extends Fea
//
// ---------------------------------
FSIterator<T> fsIterator();
- Iterator<T> iterator();
+// Iterator<T> iterator(); // inherited, not needed here
<N extends T> List<N> asList();
<N extends T> N[] asArray(Class<N> clazz);
- Spliterator<T> spliterator();
+// Spliterator<T> spliterator(); // inherited, not needed here
// returning one item
@@ -200,6 +199,14 @@ public interface SelectFSs<T extends Fea
T singleOrNull(int begin, int end, int offset); // throws if more than 1 element, returns single or null
+ @Override
+ default Spliterator<T> spliterator() {
+ // TODO Auto-generated method stub
+ return Iterable.super.spliterator();
+ }
+
+
+
/**
* static methods that more effectively capture the generic argument
* @param index -
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java?rev=1775915&r1=1775914&r2=1775915&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java Fri Dec 23 21:51:31 2016
@@ -22,7 +22,6 @@ package org.apache.uima.cas.impl;
import java.lang.reflect.Array;
import java.util.AbstractSequentialList;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
@@ -140,7 +139,7 @@ public class SelectFSs_impl <T extends F
************************************************/
/**
* INDEX
- * If not specified, defaults to all FSs (unordered) unless AnnotationIndex implied
+ * If not specified, defaults to all FSs (orderNotNeeded) unless AnnotationIndex implied
* @param indexName -
* @param <N> type of returned Feature Structures
* @return -
@@ -300,12 +299,12 @@ public class SelectFSs_impl <T extends F
}
@Override
- public SelectFSs_impl<T> unordered() { // ignored if not ordered index
+ public SelectFSs_impl<T> orderNotNeeded() { // ignored if not ordered index
this.isUnordered = true;
return this;
}
@Override
- public SelectFSs_impl<T> unordered(boolean bUnordered) { // ignored if not ordered index
+ public SelectFSs_impl<T> orderNotNeeded(boolean bUnordered) { // ignored if not ordered index
this.isUnordered = bUnordered;
return this;
}
@@ -786,8 +785,8 @@ public class SelectFSs_impl <T extends F
* Sets the characteristics from the context:
* IMMUTABLE / NONNULL / DISTINCT - always
* CONCURRENT - never
- * ORDERED - unless unordered index or not SORTED_INDEX or SET_INDEX
- * SORTED - only for SORTED_INDEX (and not unordered?)
+ * 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
@@ -1414,4 +1413,9 @@ public class SelectFSs_impl <T extends F
stream().close();
}
+ @Override
+ public Stream<T> unordered() {
+ return stream().unordered();
+ }
+
}