com.thinkaurelius.titan.graphdb.util

## Class AllEdgesIterator

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.util.AllEdgesIterator

- All Implemented Interfaces:
    Iterator<com.tinkerpop.blueprints.Edge>

      public class AllEdgesIterator
      extends Object
      implements Iterator<com.tinkerpop.blueprints.Edge>

  Defines an `Iterator` over all `TitanEdge`s connecting a provided set of vertices.

  Given a set of vertices, one may be interested in all edges that are contained in the subgraph spanned by those vertices. This iterator will return these edges.
  Author:
    Matthias Bröcheler (me@matthiasb.com);

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AllEdgesIterator(Iterator<? extends com.tinkerpop.blueprints.Vertex> vertexIter)` Returns an iterator over all edges incident on the vertices returned by the given Iterable over vertices.
    `AllEdgesIterator(Set<? extends com.tinkerpop.blueprints.Vertex> vertices)` Returns an iterator over all edges contained in the subgraph spanned by the given vertices.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `com.tinkerpop.blueprints.Edge` | `next()`
    `void` | `remove()` Removing edges is not supported!

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AllEdgesIterator

          public AllEdgesIterator(Iterator<? extends com.tinkerpop.blueprints.Vertex> vertexIter)

      Returns an iterator over all edges incident on the vertices returned by the given Iterable over vertices.

      Note that this method assumes that the given Iterable will return all vertices in the connected component, otherwise the behavior of this method is undefined.
      Parameters:
        `vertexIter` - Iterator over a set of vertices defining a connected component.

    - #### AllEdgesIterator

          public AllEdgesIterator(Set<? extends com.tinkerpop.blueprints.Vertex> vertices)

      Returns an iterator over all edges contained in the subgraph spanned by the given vertices.

      This method will return all edges whose end points are contained in the given set of vertices.
      Parameters:
        `vertices` - Set of vertices

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<com.tinkerpop.blueprints.Edge>`

    - #### next

          public com.tinkerpop.blueprints.Edge next()

      Specified by:
        `next` in interface `Iterator<com.tinkerpop.blueprints.Edge>`

    - #### remove

          public void remove()

      Removing edges is not supported!
      Specified by:
        `remove` in interface `Iterator<com.tinkerpop.blueprints.Edge>`
      Throws:
        `UnsupportedOperationException` - if invoked

Copyright © 2012–2014. All rights reserved.