Class Edge

  • All Implemented Interfaces:
    Comparable<Edge>

    public class Edge
    extends Object
    implements Comparable<Edge>
    An Edge represents the connection between two nodes.

    There are two types of edges:

    • An edge having the label REFERENCES represents a dependency from node from to node to. For example a node for class A references a node for class B if A references (uses, depends on) B. Similar a package or slice will reference another package or slice if they contain at least one pair of class nodes that reference each other. The from and to nodes of a referencing edge will always have the same node type.
    • An edge having the label CONTAINS reflects that node from contains node to. Typically a package or slice node contains a class node if the class belongs to the package or slice. The from and to nodes of a containing edge will always have different node types.
    A referencing edge may have its ignored flag set to true. In this case this edge is not considered when checking any dependency violations between packages or slices.
    • Method Detail

      • references

        public static Edge references​(Node from,
                                      Node to,
                                      boolean ignored)
      • references

        public static Edge references​(Node from,
                                      Node to)
      • contains

        public static Edge contains​(Node from,
                                    Node to)
      • isReferencing

        public boolean isReferencing()
      • isContaining

        public boolean isContaining()
      • combine

        public void combine​(Edge edge)
      • setViolating

        public void setViolating()
      • isIncluded

        public boolean isIncluded()
      • displayString

        public String displayString()
      • getFrom

        public Node getFrom()
      • getTo

        public Node getTo()
      • isIgnored

        public boolean isIgnored()
      • getWeight

        public int getWeight()
      • isViolating

        public boolean isViolating()
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object