Class Graph<T>

  • Direct Known Subclasses:
    LabeledGraph

    public class Graph<T>
    extends java.lang.Object
    • Constructor Detail

      • Graph

        public Graph()
      • Graph

        public Graph​(T node)
      • Graph

        public Graph​(java.util.Collection<T> nodes)
      • Graph

        public Graph​(Graph<T> toClone)
    • Method Detail

      • addItem

        public void addItem​(T item)
      • addPath

        public void addPath​(java.util.List<T> path)
      • getItems

        public java.util.Set<T> getItems()
      • hasItem

        public boolean hasItem​(T item)
      • hasEdge

        public boolean hasEdge​(T from,
                               T to)
      • hasPath

        public boolean hasPath​(java.util.List<T> nodes)
      • removeItem

        public void removeItem​(T item)
      • addEdge

        public void addEdge​(T from,
                            T to)
      • removeEdge

        public void removeEdge​(T from,
                               T to)
      • getSuccessors

        public java.util.Set<T> getSuccessors​(T item)
      • getPredecessors

        public java.util.Set<T> getPredecessors​(T item)
      • getSources

        public final java.util.Collection<T> getSources()
      • getRoot

        public final T getRoot()
      • getSinks

        public final java.util.Collection<T> getSinks()
      • addGraph

        public final void addGraph​(Graph<T> g)
      • isEmpty

        public boolean isEmpty()
      • getLineBasedStringRepresentation

        public java.lang.String getLineBasedStringRepresentation()
        Creates a new line for each path in the graph where the prefix common to the previous line is omitted. The order is obtained by BFS.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getLineBasedStringRepresentation

        public java.lang.String getLineBasedStringRepresentation​(int offset)
      • isGraphSane

        public boolean isGraphSane()
      • isUseBackPointers

        public boolean isUseBackPointers()
      • setUseBackPointers

        public void setUseBackPointers​(boolean useBackPointers)
      • isUseForwardPointers

        public boolean isUseForwardPointers()
      • setUseForwardPointers

        public void setUseForwardPointers​(boolean useForwardPointers)