Class IncidentEdgeSet<N>

  • All Implemented Interfaces:
    java.lang.Iterable<EndpointPair<N>>, java.util.Collection<EndpointPair<N>>, java.util.Set<EndpointPair<N>>

    abstract class IncidentEdgeSet<N>
    extends java.util.AbstractSet<EndpointPair<N>>
    Abstract base class for an incident edges set that allows different implementations of AbstractCollection.iterator().
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected BaseGraph<N> graph  
      protected N node  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.Object obj)  
      boolean remove​(java.lang.Object o)  
      int size()  
      • Methods inherited from class java.util.AbstractSet

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

        add, addAll, clear, containsAll, isEmpty, iterator, retainAll, 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, iterator, retainAll, spliterator, toArray, toArray
    • Field Detail

      • node

        protected final N node
    • Constructor Detail

      • IncidentEdgeSet

        IncidentEdgeSet​(BaseGraph<N> graph,
                        N node)
    • Method Detail

      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<N>
        Specified by:
        remove in interface java.util.Set<N>
        Overrides:
        remove in class java.util.AbstractCollection<EndpointPair<N>>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<N>
        Specified by:
        size in interface java.util.Set<N>
        Specified by:
        size in class java.util.AbstractCollection<EndpointPair<N>>
      • contains

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