/** Answer a list containing the elements from the iterator <code>it</code>, in order; a shorthand for <code>IteratorCollection.iteratorToList(it)</code>, which see. */ public static <T> List<T> iteratorToList( Iterator<? extends T> it ) { return IteratorCollection.iteratorToList( it ); }
/** * Answer a list containing the elements from the iterator <code>it</code>, * in order; a shorthand for * <code>IteratorCollection.iteratorToList(it)</code>, which see. */ public static <T> List<T> iteratorToList(Iterator<? extends T> it) { return IteratorCollection.iteratorToList(it); }
/** * Delete the triples supplied by an iterator. This function is "concurrent * modification" safe - it internally takes a copy of the iterator. */ private static void deleteIteratorWorker(Graph graph, Iterator<Triple> it) { List<Triple> s = IteratorCollection.iteratorToList(it) ; deleteIteratorWorkerDirect(graph, s.iterator()); }
/** Answer a list containing the elements from the iterator <code>it</code>, in order; a shorthand for <code>IteratorCollection.iteratorToList(it)</code>, which see. */ public static <T> List<T> iteratorToList( Iterator<? extends T> it ) { return IteratorCollection.iteratorToList( it ); }
@Override public void notifyDeleteIterator(Graph g, Iterator<Triple> it) { notifyDeleteIterator(g, IteratorCollection.iteratorToList(it)) ; }
/** * Delete the triples supplied by an iterator. This function is "concurrent * modification" safe - it internally takes a copy of the iterator. */ private static void deleteIteratorWorker(Graph graph, Iterator<Triple> it) { List<Triple> s = IteratorCollection.iteratorToList(it) ; deleteIteratorWorkerDirect(graph, s.iterator()); }
/** * Answer a list containing the elements from the iterator <code>it</code>, * in order; a shorthand for * <code>IteratorCollection.iteratorToList(it)</code>, which see. */ public static <T> List<T> iteratorToList(Iterator<? extends T> it) { return IteratorCollection.iteratorToList(it); }
@Override public void notifyDeleteIterator(Graph g, Iterator<Triple> it) { notifyDeleteIterator(g, IteratorCollection.iteratorToList(it)) ; }
private static void addIteratorWorker( Graph graph, Iterator<Triple> it ) { List<Triple> s = IteratorCollection.iteratorToList( it ); addIteratorWorkerDirect(graph, s.iterator()); }
@Override public void notifyAddIterator(Graph g, Iterator<Triple> it) { notifyAddIterator(g, IteratorCollection.iteratorToList(it)) ; }
private static void addIteratorWorker( Graph graph, Iterator<Triple> it ) { List<Triple> s = IteratorCollection.iteratorToList( it ); addIteratorWorkerDirect(graph, s.iterator()); }
public static void delete(Graph graph, Iterator<Triple> it) { if ( OldStyle && graph instanceof GraphWithPerform ) { // Materialize for the notify. List<Triple> s = IteratorCollection.iteratorToList(it) ; deleteIteratorWorkerDirect(graph, s.iterator()); graph.getEventManager().notifyDeleteIterator(graph, s) ; } else deleteIteratorWorker(graph, it); }
public void testLotsToList() { List<Object> list = Arrays.asList( new Object[] {"to", "be", "or", "not", "to", "be"} ); assertEquals( list, IteratorCollection.iteratorToList( list.iterator() ) ); }
public static void add(Graph graph, Iterator<Triple> it) { if ( OldStyle && graph instanceof GraphWithPerform ) { // Materialize for the notify. List<Triple> s = IteratorCollection.iteratorToList(it) ; addIteratorWorkerDirect(graph, s.iterator()); graph.getEventManager().notifyAddIterator(graph, s) ; } else addIteratorWorker(graph, it); }
public static void delete(Graph graph, Iterator<Triple> it) { if ( OldStyle && graph instanceof GraphWithPerform ) { // Materialize for the notify. List<Triple> s = IteratorCollection.iteratorToList(it) ; deleteIteratorWorkerDirect(graph, s.iterator()); graph.getEventManager().notifyDeleteIterator(graph, s) ; } else deleteIteratorWorker(graph, it); }
public static void add(Graph graph, Iterator<Triple> it) { if ( OldStyle && graph instanceof GraphWithPerform ) { // Materialize for the notify. List<Triple> s = IteratorCollection.iteratorToList(it) ; addIteratorWorkerDirect(graph, s.iterator()); graph.getEventManager().notifyAddIterator(graph, s) ; } else addIteratorWorker(graph, it); }
public void testLotsToList() { List<Object> list = Arrays.asList( new Object[] {"to", "be", "or", "not", "to", "be"} ); assertEquals( list, IteratorCollection.iteratorToList( list.iterator() ) ); }
public void testEmptyToEmptyList() { assertEquals( new ArrayList<>(), IteratorCollection.iteratorToList( NullIterator.instance() ) ); }
public void testEmptyToEmptyList() { assertEquals( new ArrayList<>(), IteratorCollection.iteratorToList( NullIterator.instance() ) ); }
public void testSingletonToSingletonList() { assertEquals( oneList( "just one" ), IteratorCollection.iteratorToList( new SingletonIterator<>( "just one" ) ) ); }