Class MultiEdgesConnecting<E>

  • Type Parameters:
    E - Edge parameter type
    All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>, java.util.Set<E>

    abstract class MultiEdgesConnecting<E>
    extends java.util.AbstractSet<E>
    A class to represent the set of edges connecting an (implicit) origin node to a target node.

    The outEdgeToNode map allows this class to work on networks with parallel edges. See EdgesConnecting for a class that is more efficient but forbids parallel edges.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<E,​?> outEdgeToNode  
      private java.lang.Object targetNode  
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiEdgesConnecting​(java.util.Map<E,​?> outEdgeToNode, java.lang.Object targetNode)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.Object edge)  
      UnmodifiableIterator<E> iterator()  
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        add, addAll, clear, containsAll, isEmpty, remove, retainAll, size, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        add, addAll, clear, containsAll, isEmpty, remove, retainAll, size, spliterator, toArray, toArray
    • Field Detail

      • outEdgeToNode

        private final java.util.Map<E,​?> outEdgeToNode
      • targetNode

        private final java.lang.Object targetNode
    • Constructor Detail

      • MultiEdgesConnecting

        MultiEdgesConnecting​(java.util.Map<E,​?> outEdgeToNode,
                             java.lang.Object targetNode)
    • Method Detail

      • iterator

        public UnmodifiableIterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Specified by:
        iterator in interface java.util.Set<E>
        Specified by:
        iterator in class java.util.AbstractCollection<E>
      • contains

        public boolean contains​(java.lang.Object edge)
        Specified by:
        contains in interface java.util.Collection<E>
        Specified by:
        contains in interface java.util.Set<E>
        Overrides:
        contains in class java.util.AbstractCollection<E>