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 2019/06/26 18:05:53 UTC

svn commit: r1862175 - /uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java

Author: schor
Date: Wed Jun 26 18:05:53 2019
New Revision: 1862175

URL: http://svn.apache.org/viewvc?rev=1862175&view=rev
Log:
[UIMA-6060] 0 length FSArrays and subtypes thereof

Modified:
    uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java

Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java?rev=1862175&r1=1862174&r2=1862175&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java Wed Jun 26 18:05:53 2019
@@ -1265,13 +1265,22 @@ public interface CAS extends AbstractCas
   };
 
   /** 
-   * @param <T> the type of the lements of the FSArray
-   * @return a lazily created shared (for this CAS) 0-length array
+   * @param <T> the type of the elements of the FSArray
+   * @return a lazily created shared (for this CAS) 0-length FSarray 
    */
   default <T extends FeatureStructure> FSArray<T> emptyFSArray() {
     return ((CASImpl)getLowLevelCAS()).emptyFSArray();
   };
-
+  
+  /**
+   * @param type the type of the elements of the FSArray 
+   * @param <T> the type of the elements of the FSArray
+   * @return a lazily created shared (for this CAS) 0-length subtype of FSarray holding elements of type element-type 
+   */
+  default <T extends FeatureStructure> FSArray<T> emptyFSArray(Type type) {
+    return ((CASImpl)getLowLevelCAS()).emptyFSArray(type);
+  };
+  
   /** 
    * @return a lazily created shared (for this CAS) 0-length array
    */