Package hydra.paths
Class SubtypeLink
- java.lang.Object
-
- hydra.paths.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubtypeLink.BuilderA fluent builder forSubtypeLink.
-
Field Summary
Fields Modifier and Type Field Description TypeNodechildThe child node (inline; the structure is a tree)static NameCHILDName of thehydra.paths.SubtypeLink.childfield.SubtypeStepstepThe step by which the child subtype is reachedstatic NameSTEPName of thehydra.paths.SubtypeLink.stepfield.static NameTYPE_Name of thehydra.paths.SubtypeLinktype.
-
Constructor Summary
Constructors Constructor Description SubtypeLink(SubtypeStep step, TypeNode child)Constructs an immutableSubtypeLink.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubtypeLink.Builderbuilder()Creates a new fluent builder forSubtypeLink.intcompareTo(SubtypeLink other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()SubtypeLinkwithChild(TypeNode child)Returns a copy of thisSubtypeLinkwithchildreplaced.SubtypeLinkwithStep(SubtypeStep step)Returns a copy of thisSubtypeLinkwithstepreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.paths.SubtypeLinktype.
-
STEP
public static final Name STEP
Name of thehydra.paths.SubtypeLink.stepfield.
-
CHILD
public static final Name CHILD
Name of thehydra.paths.SubtypeLink.childfield.
-
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 immutableSubtypeLink.- Parameters:
step- The step by which the child subtype is reachedchild- The child node (inline; the structure is a tree)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(SubtypeLink other)
- Specified by:
compareToin interfacejava.lang.Comparable<SubtypeLink>
-
withStep
public SubtypeLink withStep(SubtypeStep step)
Returns a copy of thisSubtypeLinkwithstepreplaced.
-
withChild
public SubtypeLink withChild(TypeNode child)
Returns a copy of thisSubtypeLinkwithchildreplaced.
-
builder
public static SubtypeLink.Builder builder()
Creates a new fluent builder forSubtypeLink.
-
-