Class ImmutableReferenceEdge
java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.graph.Edge
com.riadalabs.jira.plugins.insight.services.model.graph.ReferenceEdge
com.riadalabs.jira.plugins.insight.services.model.graph.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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableReferenceEdge.Nested classes/interfaces inherited from class com.riadalabs.jira.plugins.insight.services.model.graph.ReferenceEdge
ReferenceEdge.Type -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableReferenceEdge.static ImmutableReferenceEdgecopyOf(ReferenceEdge instance) Creates an immutable copy of aReferenceEdgevalue.booleanThis instance is equal to all instances ofImmutableReferenceEdgethat have equal attribute values.from()inthashCode()Computes a hash code from attributes:from,to,label,objectTypeAttribute,type.label()Describes the label placed on the edge between two nodesto()toString()Prints the immutable valueReferenceEdgewith attribute values.type()final ImmutableReferenceEdgeCopy the current immutable object by setting a value for thefromattribute.final ImmutableReferenceEdgeCopy the current immutable object by setting a value for thelabelattribute.final ImmutableReferenceEdgeCopy the current immutable object by setting a value for theobjectTypeAttributeattribute.final ImmutableReferenceEdgeCopy the current immutable object by setting a value for thetoattribute.final ImmutableReferenceEdgewithType(ReferenceEdge.Type value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
from
-
to
-
label
Describes the label placed on the edge between two nodes -
objectTypeAttribute
- Specified by:
objectTypeAttributein classReferenceEdge- Returns:
- The value of the
objectTypeAttributeattribute
-
type
- Overrides:
typein classReferenceEdge- Returns:
- The value of the
typeattribute
-
withFrom
Copy the current immutable object by setting a value for thefromattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for from- Returns:
- A modified copy of the
thisobject
-
withTo
Copy the current immutable object by setting a value for thetoattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for to- Returns:
- A modified copy of the
thisobject
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- Returns:
- A modified copy of the
thisobject
-
withObjectTypeAttribute
Copy the current immutable object by setting a value for theobjectTypeAttributeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for objectTypeAttribute- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableReferenceEdgethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:from,to,label,objectTypeAttribute,type. -
toString
Prints the immutable valueReferenceEdgewith attribute values. -
copyOf
Creates an immutable copy of aReferenceEdgevalue. 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
Creates a builder forImmutableReferenceEdge.ImmutableReferenceEdge.builder() .setFrom(String) // requiredfrom.setTo(String) // requiredto.setLabel(String) // requiredlabel.setObjectTypeAttribute(com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean) // requiredobjectTypeAttribute.setType(com.riadalabs.jira.plugins.insight.services.model.graph.ReferenceEdge.Type) // optionaltype.build();- Returns:
- A new ImmutableReferenceEdge builder
-