Package hydra.paths

Class SubtypeLink

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

    public class SubtypeLink
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<SubtypeLink>
    An outgoing link to an immediate subtype, carried inline as a child node
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_

        public static final Name TYPE_
        Name of the hydra.paths.SubtypeLink type.
      • STEP

        public static final Name STEP
        Name of the hydra.paths.SubtypeLink.step field.
      • CHILD

        public static final Name CHILD
        Name of the hydra.paths.SubtypeLink.child field.
      • step

        public final SubtypeStep step
        The step by which the child subtype is reached
      • child

        public final TypeNode child
        The child node (inline; the structure is a tree)
    • Constructor Detail

      • SubtypeLink

        public SubtypeLink​(SubtypeStep step,
                           TypeNode child)
        Constructs an immutable SubtypeLink.
        Parameters:
        step - The step by which the child subtype is reached
        child - The child node (inline; the structure is a tree)
    • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

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