Class Graphs.UnmodifiableDirectedGraph<V,E>

java.lang.Object
edu.uci.ics.jung.graph.util.Graphs.UnmodifiableAbstractGraph<V,E>
edu.uci.ics.jung.graph.util.Graphs.UnmodifiableDirectedGraph<V,E>
All Implemented Interfaces:
DirectedGraph<V,E>, Graph<V,E>, Hypergraph<V,E>, Serializable
Enclosing class:
Graphs

static class Graphs.UnmodifiableDirectedGraph<V,E> extends Graphs.UnmodifiableAbstractGraph<V,E> implements DirectedGraph<V,E>, Serializable
  • Constructor Details

    • UnmodifiableDirectedGraph

      private UnmodifiableDirectedGraph(DirectedGraph<V,E> delegate)
  • Method Details

    • getDest

      public V getDest(E directed_edge)
      Description copied from interface: Graph
      If directed_edge is a directed edge in this graph, returns the destination; otherwise returns null. The destination of a directed edge d is defined to be the vertex incident to d for which d is an incoming edge. directed_edge is guaranteed to be a directed edge if its EdgeType is DIRECTED.
      Specified by:
      getDest in interface Graph<V,E>
      Specified by:
      getDest in interface Hypergraph<V,E>
      Overrides:
      getDest in class Graphs.UnmodifiableAbstractGraph<V,E>
      Parameters:
      directed_edge - the edge whose destination is to be returned
      Returns:
      the destination of directed_edge if it is a directed edge in this graph, or null otherwise
      See Also:
    • getSource

      public V getSource(E directed_edge)
      Description copied from interface: Graph
      If directed_edge is a directed edge in this graph, returns the source; otherwise returns null. The source of a directed edge d is defined to be the vertex for which d is an outgoing edge. directed_edge is guaranteed to be a directed edge if its EdgeType is DIRECTED.
      Specified by:
      getSource in interface Graph<V,E>
      Specified by:
      getSource in interface Hypergraph<V,E>
      Overrides:
      getSource in class Graphs.UnmodifiableAbstractGraph<V,E>
      Parameters:
      directed_edge - the edge whose source is to be returned
      Returns:
      the source of directed_edge if it is a directed edge in this graph, or null otherwise
      See Also:
    • isDest

      public boolean isDest(V vertex, E edge)
      Description copied from interface: Graph
      Returns true if vertex is the destination of edge. Equivalent to getDest(edge).equals(vertex).
      Specified by:
      isDest in interface Graph<V,E>
      Overrides:
      isDest in class Graphs.UnmodifiableAbstractGraph<V,E>
      Parameters:
      vertex - the vertex to be queried
      edge - the edge to be queried
      Returns:
      true iff vertex is the destination of edge
      See Also:
    • isSource

      public boolean isSource(V vertex, E edge)
      Description copied from interface: Graph
      Returns true if vertex is the source of edge. Equivalent to getSource(edge).equals(vertex).
      Specified by:
      isSource in interface Graph<V,E>
      Overrides:
      isSource in class Graphs.UnmodifiableAbstractGraph<V,E>
      Parameters:
      vertex - the vertex to be queried
      edge - the edge to be queried
      Returns:
      true iff vertex is the source of edge
      See Also: