Package hydra.paths
Class SubtermProperty
- java.lang.Object
-
- hydra.paths.SubtermProperty
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SubtermProperty>
public class SubtermProperty extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<SubtermProperty>
A link from a node to a leaf term (literal, unit, projection, unwrap, or an unbound variable)- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubtermProperty.BuilderA fluent builder forSubtermProperty.
-
Field Summary
Fields Modifier and Type Field Description SubtermPathpathThe subterm path at which the leaf term occursstatic NamePATHName of thehydra.paths.SubtermProperty.pathfield.TermtargetThe leaf termstatic NameTARGETName of thehydra.paths.SubtermProperty.targetfield.static NameTYPE_Name of thehydra.paths.SubtermPropertytype.
-
Constructor Summary
Constructors Constructor Description SubtermProperty(SubtermPath path, Term target)Constructs an immutableSubtermProperty.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubtermProperty.Builderbuilder()Creates a new fluent builder forSubtermProperty.intcompareTo(SubtermProperty other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()SubtermPropertywithPath(SubtermPath path)Returns a copy of thisSubtermPropertywithpathreplaced.SubtermPropertywithTarget(Term target)Returns a copy of thisSubtermPropertywithtargetreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.paths.SubtermPropertytype.
-
PATH
public static final Name PATH
Name of thehydra.paths.SubtermProperty.pathfield.
-
TARGET
public static final Name TARGET
Name of thehydra.paths.SubtermProperty.targetfield.
-
path
public final SubtermPath path
The subterm path at which the leaf term occurs
-
target
public final Term target
The leaf term
-
-
Constructor Detail
-
SubtermProperty
public SubtermProperty(SubtermPath path, Term target)
Constructs an immutableSubtermProperty.- Parameters:
path- The subterm path at which the leaf term occurstarget- The leaf term
-
-
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(SubtermProperty other)
- Specified by:
compareToin interfacejava.lang.Comparable<SubtermProperty>
-
withPath
public SubtermProperty withPath(SubtermPath path)
Returns a copy of thisSubtermPropertywithpathreplaced.
-
withTarget
public SubtermProperty withTarget(Term target)
Returns a copy of thisSubtermPropertywithtargetreplaced.
-
builder
public static SubtermProperty.Builder builder()
Creates a new fluent builder forSubtermProperty.
-
-