ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1748732 - /ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/util/ListFactory.java
Date Thu, 16 Jun 2016 14:11:25 GMT
Author: tmill
Date: Thu Jun 16 14:11:25 2016
New Revision: 1748732

URL: http://svn.apache.org/viewvc?rev=1748732&view=rev
Log:
Added convenience method to create FSList from java.util.List.

Modified:
    ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/util/ListFactory.java

Modified: ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/util/ListFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/util/ListFactory.java?rev=1748732&r1=1748731&r2=1748732&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/util/ListFactory.java (original)
+++ ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/util/ListFactory.java Thu
Jun 16 14:11:25 2016
@@ -22,6 +22,9 @@ import org.apache.uima.jcas.cas.EmptyFSL
 import org.apache.uima.jcas.cas.FSList;
 import org.apache.uima.jcas.cas.NonEmptyFSList;
 import org.apache.uima.jcas.cas.TOP;
+
+import java.util.List;
+
 import org.apache.uima.jcas.JCas;
 
 /**
@@ -66,6 +69,10 @@ public class ListFactory {
 		return firstList;
 	}
 	
+	public static FSList buildList(JCas jcas, List<? extends TOP> objArr){
+	  return buildList(jcas, objArr.toArray(new TOP[]{}));
+	}
+	
 	public static void append(JCas jcas, FSList list, TOP element){
 	  if(list instanceof EmptyFSList) return;
 	  	  



Mime
View raw message