Record Class Labels.Value

java.lang.Object
java.lang.Record
org.neo4j.cypherdsl.core.Labels.Value
Record Components:
modifier - modifier for the given content
visitable - the actual value
All Implemented Interfaces:
Visitable
Enclosing class:
Labels

public static record Labels.Value(Labels.Modifier modifier, Visitable visitable) extends Record implements Visitable
The content of this expression. Depending on the modifier, the expression can be dynamically or statically matched. The actual value must resolve to an expression that either is
  • A single string
  • A list of strings
  • A parameter holding either a single or a list of strings
  • Constructor Details

    • Value

      public Value(Labels.Modifier modifier, Visitable visitable)
      Creates an instance of a Value record class.
      Parameters:
      modifier - the value for the modifier record component
      visitable - the value for the visitable record component
  • Method Details

    • accept

      public void accept(Visitor visitor)
      Description copied from interface: Visitable
      Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
      Specified by:
      accept in interface Visitable
      Parameters:
      visitor - the visitor to notify, must not be null.
    • toString

      public final String 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.
      Specified by:
      toString in interface Visitable
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • modifier

      public Labels.Modifier modifier()
      Returns the value of the modifier record component.
      Returns:
      the value of the modifier record component
    • visitable

      public Visitable visitable()
      Returns the value of the visitable record component.
      Returns:
      the value of the visitable record component