Package hydra.error.neo4j
Class RelationshipPattern
- java.lang.Object
-
- hydra.error.neo4j.RelationshipPattern
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<RelationshipPattern>
public class RelationshipPattern extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<RelationshipPattern>
A declared source/target label pattern for a relationship type, used in NoMatchingPatternError- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRelationshipPattern.BuilderA fluent builder forRelationshipPattern.
-
Field Summary
Fields Modifier and Type Field Description static NameEND_LABELName of thehydra.error.neo4j.RelationshipPattern.endLabelfield.NodeLabelendLabelThe required end-node labelstatic NameSTART_LABELName of thehydra.error.neo4j.RelationshipPattern.startLabelfield.NodeLabelstartLabelThe required start-node labelstatic NameTYPE_Name of thehydra.error.neo4j.RelationshipPatterntype.
-
Constructor Summary
Constructors Constructor Description RelationshipPattern(NodeLabel startLabel, NodeLabel endLabel)Constructs an immutableRelationshipPattern.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RelationshipPattern.Builderbuilder()Creates a new fluent builder forRelationshipPattern.intcompareTo(RelationshipPattern other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()RelationshipPatternwithEndLabel(NodeLabel endLabel)Returns a copy of thisRelationshipPatternwithendLabelreplaced.RelationshipPatternwithStartLabel(NodeLabel startLabel)Returns a copy of thisRelationshipPatternwithstartLabelreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.error.neo4j.RelationshipPatterntype.
-
START_LABEL
public static final Name START_LABEL
Name of thehydra.error.neo4j.RelationshipPattern.startLabelfield.
-
END_LABEL
public static final Name END_LABEL
Name of thehydra.error.neo4j.RelationshipPattern.endLabelfield.
-
startLabel
public final NodeLabel startLabel
The required start-node label
-
endLabel
public final NodeLabel endLabel
The required end-node label
-
-
Constructor Detail
-
RelationshipPattern
public RelationshipPattern(NodeLabel startLabel, NodeLabel endLabel)
Constructs an immutableRelationshipPattern.- Parameters:
startLabel- The required start-node labelendLabel- The required end-node label
-
-
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(RelationshipPattern other)
- Specified by:
compareToin interfacejava.lang.Comparable<RelationshipPattern>
-
withStartLabel
public RelationshipPattern withStartLabel(NodeLabel startLabel)
Returns a copy of thisRelationshipPatternwithstartLabelreplaced.
-
withEndLabel
public RelationshipPattern withEndLabel(NodeLabel endLabel)
Returns a copy of thisRelationshipPatternwithendLabelreplaced.
-
builder
public static RelationshipPattern.Builder builder()
Creates a new fluent builder forRelationshipPattern.
-
-