Tabnine Logo
RawIterator.next
Code IndexAdd Tabnine to your IDE (free)

How to use
next
method
in
org.neo4j.collection.RawIterator

Best Java code snippets using org.neo4j.collection.RawIterator.next (Showing top 20 results out of 315)

origin: neo4j/neo4j

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;
}
origin: neo4j/neo4j

  @Override
  public Object[] next() throws ProcedureException
  {
    try ( KernelTransaction.Revertable ignore = ktx.overrideWith( procedureSecurityContext ) )
    {
      return procedureCall.next();
    }
  }
};
origin: neo4j/neo4j

@Override
public TO next() throws EX
{
  FROM from = fromIterator.next();
  return function.apply( from );
}
origin: neo4j/neo4j

  private static List<Integer> list( RawIterator<Integer, RuntimeException> iter )
  {
    LinkedList<Integer> out = new LinkedList<>();
    while ( iter.hasNext() )
    {
      out.add( iter.next() );
    }
    return out;
  }
}
origin: neo4j/neo4j

private boolean goToNextSource() throws IOException
{
  if ( actual.hasNext() )
  {
    if ( current != null )
    {
      previousPosition += current.position();
    }
    closeCurrent();
    current = actual.next();
    return true;
  }
  return false;
}
origin: neo4j/neo4j

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;
}
origin: neo4j/neo4j

@Test
public void shouldIgnoreWhiteListingIfFullAccess() throws Throwable
{
  // Given
  ProcedureConfig config = new ProcedureConfig( Config.defaults( procedure_whitelist, "empty" ) );
  Log log = mock(Log.class);
  ReflectiveProcedureCompiler procedureCompiler = new ReflectiveProcedureCompiler( new TypeMappers(), components,
      components, log, config );
  // When
  CallableProcedure proc =
      procedureCompiler.compileProcedure( SingleReadOnlyProcedure.class, null, true ).get( 0 );
  // Then
  RawIterator<Object[],ProcedureException> result = proc.apply( new BasicContext(), new Object[0], resourceTracker );
  assertEquals( result.next()[0], "Bonnie" );
}
origin: neo4j/neo4j

@Test
public void shouldLoadWhiteListedProcedure() throws Throwable
{
  // Given
  ProcedureConfig config = new ProcedureConfig(
      Config.defaults( procedure_whitelist, "org.neo4j.kernel.impl.proc.listCoolPeople" ) );
  Log log = mock(Log.class);
  ReflectiveProcedureCompiler procedureCompiler = new ReflectiveProcedureCompiler( new TypeMappers(), components,
      components, log, config );
  // When
  CallableProcedure proc =
      procedureCompiler.compileProcedure( SingleReadOnlyProcedure.class, null, false ).get( 0 );
  // When
  RawIterator<Object[],ProcedureException> result = proc.apply( new BasicContext(), new Object[0], resourceTracker );
  // Then
  assertEquals( result.next()[0], "Bonnie" );
}
origin: neo4j/neo4j

if ( stream.hasNext() )
  stream.next();
origin: neo4j/neo4j

Object[] next = stream.next();
assertEquals( 2, next.length );
ArrayList<Node> nodes = (ArrayList<Node>) next[0];
origin: neo4j/neo4j

Object[] next = stream.next();
assertEquals( 2, next.length );
LinkedList<Relationship> relationships = (LinkedList<Relationship>) next[1];
origin: neo4j/neo4j

while ( stream.hasNext() )
  result.add( stream.next() );
origin: neo4j/neo4j

while ( sources.hasNext() )
  try ( CharReadable source = sources.next() )
origin: neo4j/neo4j

        new Object[0] );
assertTrue( stream.hasNext() );
Object[] result = stream.next();
assertFalse( stream.hasNext() );
origin: org.neo4j/neo4j-collections

@Override
public TO next() throws EX
{
  FROM from = fromIterator.next();
  return function.apply( from );
}
origin: org.neo4j/neo4j-kernel

  @Override
  public Object[] next() throws ProcedureException
  {
    try ( KernelTransaction.Revertable ignore = ktx.overrideWith( procedureSecurityContext ) )
    {
      return procedureCall.next();
    }
  }
};
origin: org.neo4j/neo4j-collections

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;
}
origin: org.neo4j/neo4j-csv

private boolean goToNextSource() throws IOException
{
  if ( actual.hasNext() )
  {
    if ( current != null )
    {
      previousPosition += current.position();
    }
    closeCurrent();
    current = actual.next();
    return true;
  }
  return false;
}
origin: org.neo4j/neo4j-kernel

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;
}
origin: org.neo4j/neo4j-kernel

while ( sources.hasNext() )
  try ( CharReadable source = sources.next() )
org.neo4j.collectionRawIteratornext

Popular methods of RawIterator

  • hasNext
  • of
  • empty
  • from
    Create a raw iterator from the provided ThrowingSupplier - the iterator will end when the supplier r
  • remove

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Collectors (java.util.stream)
  • Notification (javax.management)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now