Class ImmutableReferenceEdge


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

Use the builder to create immutable instances: ImmutableReferenceEdge.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
    • objectTypeAttribute

      public ObjectTypeAttributeBean objectTypeAttribute()
      Specified by:
      objectTypeAttribute in class ReferenceEdge
      Returns:
      The value of the objectTypeAttribute attribute
    • type

      public ReferenceEdge.Type type()
      Overrides:
      type in class ReferenceEdge
      Returns:
      The value of the type attribute
    • withFrom

      public final ImmutableReferenceEdge 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 ImmutableReferenceEdge 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 ImmutableReferenceEdge 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
    • withObjectTypeAttribute

      public final ImmutableReferenceEdge withObjectTypeAttribute(ObjectTypeAttributeBean value)
      Copy the current immutable object by setting a value for the objectTypeAttribute attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for objectTypeAttribute
      Returns:
      A modified copy of the this object
    • withType

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableReferenceEdge 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, objectTypeAttribute, type.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableReferenceEdge copyOf(ReferenceEdge instance)
      Creates an immutable copy of a ReferenceEdge 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 ReferenceEdge instance
    • builder

      public static ImmutableReferenceEdge.Builder builder()
      Creates a builder for ImmutableReferenceEdge.
       ImmutableReferenceEdge.builder()
          .setFrom(String) // required from
          .setTo(String) // required to
          .setLabel(String) // required label
          .setObjectTypeAttribute(com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean) // required objectTypeAttribute
          .setType(com.riadalabs.jira.plugins.insight.services.model.graph.ReferenceEdge.Type) // optional type
          .build();
       
      Returns:
      A new ImmutableReferenceEdge builder