Package hydra.paths

Class SubtypeGraph

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SubtypeGraph>

    public class SubtypeGraph
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<SubtypeGraph>
    A graph of subtype nodes and edges, representing type access patterns
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_

        public static final Name TYPE_
        Name of the hydra.paths.SubtypeGraph type.
      • NODES

        public static final Name NODES
        Name of the hydra.paths.SubtypeGraph.nodes field.
      • EDGES

        public static final Name EDGES
        Name of the hydra.paths.SubtypeGraph.edges field.
      • nodes

        public final java.util.List<SubtypeNode> nodes
        All nodes in the graph
      • edges

        public final java.util.List<SubtypeEdge> edges
        All edges in the graph
    • Constructor Detail

      • SubtypeGraph

        public SubtypeGraph​(java.util.List<SubtypeNode> nodes,
                            java.util.List<SubtypeEdge> edges)
        Constructs an immutable SubtypeGraph.
        Parameters:
        nodes - All nodes in the graph
        edges - All edges in the graph
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public int compareTo​(SubtypeGraph other)
        Specified by:
        compareTo in interface java.lang.Comparable<SubtypeGraph>