@Override @Deprecated public void add( Triple [] triples ) { for (int i = 0; i < triples.length; i += 1) graph.performAdd( triples[i] ); manager.notifyAddArray( graph, triples ); }
protected void add( List<Triple> triples, boolean notify ) { for (int i = 0; i < triples.size(); i += 1) graph.performAdd( triples.get(i) ); if (notify) manager.notifyAddList( graph, triples ); }
private static void addIteratorWorker( Graph graph, Iterator<Triple> it ) { List<Triple> s = IteratorCollection.iteratorToList( it ); if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : s ) g.performAdd(t) ; } else { for (Triple t : s ) graph.add(t) ; } }
public static void add(Graph graph, List<Triple> triples) { if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : triples) g.performAdd(t) ; graph.getEventManager().notifyAddList(graph, triples) ; } else { for (Triple t : triples) graph.add(t) ; } }
public static void add(Graph graph, Triple[] triples) { if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : triples ) g.performAdd(t) ; graph.getEventManager().notifyAddArray(graph, triples) ; } else { for (Triple t : triples ) graph.add(t) ; } }
public static void add(Graph graph, Iterator<Triple> it) { // Materialize to avoid ConcurrentModificationException. List<Triple> s = IteratorCollection.iteratorToList(it) ; if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : s) g.performAdd(t) ; graph.getEventManager().notifyAddIterator(graph, s) ; } else { for (Triple t : s) graph.add(t) ; } }