Code example for Set

Methods: iterator

0
 
 
    private static class IterableBased implements Iterable<Edge> {
 
        private final Iterable<? extends Vertex> vertices;
 
        public IterableBased(Iterable<? extends Vertex> vertices) {
            this.vertices = vertices;
        } 
 
        @Override 
        public Iterator<Edge> iterator() {
            return new AllEdgesIterator(vertices.iterator());
        } 
 
    } 
 
    private static class SetBased implements Iterable<Edge> {
 
        private final Set<? extends Vertex> vertices;