@Test public void testAddElementToFSArray1() throws Exception { JCas jCas = JCasFactory.createJCas("de.julielab.jcore.types.jcore-all-types"); FSArray fsArray = new FSArray(jCas, 2); Annotation anno = new Annotation(jCas); fsArray.set(0, anno); assertEquals(anno, fsArray.get(0)); assertNull(fsArray.get(1)); Annotation newElement = new Annotation(jCas); FSArray joinedArray = JCoReTools.addToFSArray(fsArray, newElement); assertEquals("A new FSArray was instantiated although the old one should have been kept", fsArray, joinedArray); assertEquals(newElement, joinedArray.get(1)); }
public static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement) { return addToFSArray(array, newElement, DEFAULT_ADDITION_SIZE); }
JCoReTools { public static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement) { return addToFSArray(array, newElement, DEFAULT_ADDITION_SIZE); } }
JCoReTools { public static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement) { return addToFSArray(array, newElement, DEFAULT_ADDITION_SIZE); }  }
JCoReTools { public static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement) { return addToFSArray(array, newElement, DEFAULT_ADDITION_SIZE); }  static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement); static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement, final int additionSize); static FSArray addToFSArray(final FSArray inputArray,
                                       final Collection<? extends FeatureStructure> newElements); static FSArray copyFSArray(FSArray array); static StringArray newStringArray(JCas jCas, String... elements); static StringArray addToStringArray(StringArray array, String element); static StringArray addToStringArray(StringArray array, String[] elements); static void printFSArray(FSArray array); static void printAnnotationIndex(JCas jCas, int type); static String getDocId(JCas aJCas); static void deserializeXmi(CAS cas, InputStream is, int attributeBufferSize); static int binarySearch(List<T> annotations,
                                                                                   Function<T, R> comparisonValueFunction, R searchValue); static int binarySearch(List<T> annotations,
                                                                                   Function<T, R> comparisonValueFunction, R searchValue, int from, int to); static InputStream resolveExternalResourceGzipInputStream(DataResource resource); }
JCoReTools { public static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement) { return addToFSArray(array, newElement, DEFAULT_ADDITION_SIZE); }  static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement); static FSArray addToFSArray(final FSArray array, final FeatureStructure newElement, final int additionSize); static FSArray addToFSArray(final FSArray inputArray,
                                       final Collection<? extends FeatureStructure> newElements); static FSArray copyFSArray(FSArray array); static StringArray newStringArray(JCas jCas, String... elements); static StringArray addToStringArray(StringArray array, String element); static StringArray addToStringArray(StringArray array, String[] elements); static void printFSArray(FSArray array); static void printAnnotationIndex(JCas jCas, int type); static String getDocId(JCas aJCas); static void deserializeXmi(CAS cas, InputStream is, int attributeBufferSize); static int binarySearch(List<T> annotations,
                                                                                   Function<T, R> comparisonValueFunction, R searchValue); static int binarySearch(List<T> annotations,
                                                                                   Function<T, R> comparisonValueFunction, R searchValue, int from, int to); static InputStream resolveExternalResourceGzipInputStream(DataResource resource); static final int DEFAULT_ADDITION_SIZE; }