@Override public boolean hasNext() throws EX { return fromIterator.hasNext(); }
public static <T, EX extends Exception> List<T> asList( RawIterator<T, EX> iterator ) throws EX { List<T> out = new ArrayList<>(); while ( iterator.hasNext() ) { out.add( iterator.next() ); } return out; }
@Override public boolean hasNext() throws ProcedureException { try ( KernelTransaction.Revertable ignore = ktx.overrideWith( procedureSecurityContext ) ) { return procedureCall.hasNext(); } }
private static List<Integer> list( RawIterator<Integer, RuntimeException> iter ) { LinkedList<Integer> out = new LinkedList<>(); while ( iter.hasNext() ) { out.add( iter.next() ); } return out; } }
private boolean goToNextSource() throws IOException { if ( actual.hasNext() ) { if ( current != null ) { previousPosition += current.position(); } closeCurrent(); current = actual.next(); return true; } return false; }
private Callables loadProcedures( URL jar, ClassLoader loader, Callables target ) throws IOException, KernelException { RawIterator<Class<?>,IOException> classes = listClassesIn( jar, loader ); while ( classes.hasNext() ) { Class<?> next = classes.next(); target.addAllProcedures( compiler.compileProcedure( next, null, false ) ); target.addAllFunctions( compiler.compileFunction( next ) ); target.addAllAggregationFunctions( compiler.compileAggregationFunction( next ) ); } return target; }
@Test public void shouldAllowVoidOutput() throws Throwable { // When CallableProcedure proc = compile( ProcedureWithVoidOutput.class ).get( 0 ); // Then assertEquals( 0, proc.signature().outputSignature().size() ); assertFalse( proc.apply( null, new Object[0], resourceTracker ).hasNext() ); }
if ( stream.hasNext() )
while ( stream.hasNext() )
while ( stream.hasNext() )
while ( stream.hasNext() )
Data data = dataFactory.create( config ); RawIterator<CharReadable,IOException> sources = data.stream(); while ( sources.hasNext() )
@Override public boolean hasNext() throws EX { return fromIterator.hasNext(); }
@Override public boolean hasNext() throws ProcedureException { try ( KernelTransaction.Revertable ignore = ktx.overrideWith( procedureSecurityContext ) ) { return procedureCall.hasNext(); } }
public static <T, EX extends Exception> List<T> asList( RawIterator<T, EX> iterator ) throws EX { List<T> out = new ArrayList<>(); while ( iterator.hasNext() ) { out.add( iterator.next() ); } return out; }
private boolean goToNextSource() throws IOException { if ( actual.hasNext() ) { if ( current != null ) { previousPosition += current.position(); } closeCurrent(); current = actual.next(); return true; } return false; }
private Callables loadProcedures( URL jar, ClassLoader loader, Callables target ) throws IOException, KernelException { RawIterator<Class<?>,IOException> classes = listClassesIn( jar, loader ); while ( classes.hasNext() ) { Class<?> next = classes.next(); target.addAllProcedures( compiler.compileProcedure( next, null, false ) ); target.addAllFunctions( compiler.compileFunction( next ) ); target.addAllAggregationFunctions( compiler.compileAggregationFunction( next ) ); } return target; }
Data data = dataFactory.create( config ); RawIterator<CharReadable,IOException> sources = data.stream(); while ( sources.hasNext() )