Class ImmutableObjectNode.Builder
java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.graph.ImmutableObjectNode.Builder
- Enclosing class:
- ImmutableObjectNode
Builds instances of type
ImmutableObjectNode
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableObjectNode
.Fill a builder with attribute values from the providedcom.riadalabs.jira.plugins.insight.services.model.graph.Node
instance.from
(ObjectNode instance) Fill a builder with attribute values from the providedcom.riadalabs.jira.plugins.insight.services.model.graph.ObjectNode
instance.setAvatar
(AvatarBean avatar) Initializes the value for theavatar
attribute.setCanCreateReference
(boolean canCreateReference) Initializes the value for thecanCreateReference
attribute.setDepth
(int depth) Initializes the value for thedepth
attribute.setExpanded
(boolean expanded) Initializes the value for theexpanded
attribute.setId
(int id) Initializes the value for theid
attribute.setObject
(ObjectBean object) Initializes the value for theobject
attribute.setObjectTypeAttributeId
(Integer objectTypeAttributeId) Initializes the value for theobjectTypeAttributeId
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.riadalabs.jira.plugins.insight.services.model.graph.ObjectNode
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.riadalabs.jira.plugins.insight.services.model.graph.Node
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setId
Initializes the value for theid
attribute.- Parameters:
id
- The value for id- Returns:
this
builder for use in a chained invocation
-
setCanCreateReference
@CanIgnoreReturnValue public final ImmutableObjectNode.Builder setCanCreateReference(boolean canCreateReference) Initializes the value for thecanCreateReference
attribute.- Parameters:
canCreateReference
- The value for canCreateReference- Returns:
this
builder for use in a chained invocation
-
setDepth
Initializes the value for thedepth
attribute.- Parameters:
depth
- The value for depth- Returns:
this
builder for use in a chained invocation
-
setExpanded
Initializes the value for theexpanded
attribute.- Parameters:
expanded
- The value for expanded- Returns:
this
builder for use in a chained invocation
-
setObject
Initializes the value for theobject
attribute.- Parameters:
object
- The value for object- Returns:
this
builder for use in a chained invocation
-
setAvatar
Initializes the value for theavatar
attribute.- Parameters:
avatar
- The value for avatar- Returns:
this
builder for use in a chained invocation
-
setObjectTypeAttributeId
@CanIgnoreReturnValue public final ImmutableObjectNode.Builder setObjectTypeAttributeId(@Nullable Integer objectTypeAttributeId) Initializes the value for theobjectTypeAttributeId
attribute.- Parameters:
objectTypeAttributeId
- The value for objectTypeAttributeId (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableObjectNode
.- Returns:
- An immutable instance of ObjectNode
- Throws:
IllegalStateException
- if any required attributes are missing
-