Package dev.grafeo.gwp.types
Record Class GqlNode
java.lang.Object
java.lang.Record
dev.grafeo.gwp.types.GqlNode
- Record Components:
id- the opaque element identifierlabels- the label set (unordered)properties- the property map
A property graph node.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanCheck if this node has the given label.byte[]id()Returns the value of theidrecord component.labels()Returns the value of thelabelsrecord component.Returns the value of thepropertiesrecord component.Get a property value by key.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GqlNode
Creates an instance of aGqlNoderecord class.- Parameters:
id- the value for theidrecord componentlabels- the value for thelabelsrecord componentproperties- the value for thepropertiesrecord component
-
-
Method Details
-
hasLabel
Check if this node has the given label.- Parameters:
label- the label to check- Returns:
- true if the node has the label
-
property
Get a property value by key.- Parameters:
key- the property key- Returns:
- the property value, or null if not found
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
public byte[] id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
labels
Returns the value of thelabelsrecord component.- Returns:
- the value of the
labelsrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-