Class ImmutableParentEdge


@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableParentEdge extends ParentEdge
Immutable implementation of ParentEdge.

Use the builder to create immutable instances: ImmutableParentEdge.builder().

  • Method Details

    • from

      public String from()
      Specified by:
      from in class Edge
      Returns:
      The value of the from attribute
    • to

      public String to()
      Specified by:
      to in class Edge
      Returns:
      The value of the to attribute
    • label

      public String label()
      Describes the label placed on the edge between two nodes
      Specified by:
      label in class Edge
    • isInherited

      public boolean isInherited()
      Specified by:
      isInherited in class ParentEdge
      Returns:
      The value of the inherited attribute
    • withFrom

      public final ImmutableParentEdge withFrom(String value)
      Copy the current immutable object by setting a value for the from attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for from
      Returns:
      A modified copy of the this object
    • withTo

      public final ImmutableParentEdge withTo(String value)
      Copy the current immutable object by setting a value for the to attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for to
      Returns:
      A modified copy of the this object
    • withLabel

      public final ImmutableParentEdge withLabel(String value)
      Copy the current immutable object by setting a value for the label attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for label
      Returns:
      A modified copy of the this object
    • withInherited

      public final ImmutableParentEdge withInherited(boolean value)
      Copy the current immutable object by setting a value for the inherited attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for inherited
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableParentEdge that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: from, to, label, inherited.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ParentEdge with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableParentEdge copyOf(ParentEdge instance)
      Creates an immutable copy of a ParentEdge value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ParentEdge instance
    • builder

      public static ImmutableParentEdge.Builder builder()
      Creates a builder for ImmutableParentEdge.
       ImmutableParentEdge.builder()
          .setFrom(String) // required from
          .setTo(String) // required to
          .setLabel(String) // required label
          .setInherited(boolean) // required inherited
          .build();
       
      Returns:
      A new ImmutableParentEdge builder