Package io.riada.insight.model
Class ImmutableObjectTickets.Builder
java.lang.Object
io.riada.insight.model.ImmutableObjectTickets.Builder
- Enclosing class:
- ImmutableObjectTickets
Builds instances of type
ImmutableObjectTickets
.
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 TypeMethodDescriptionaddAllTickets
(Iterable<? extends Ticket> elements) Adds elements totickets
list.addTickets
(Ticket element) Adds one element totickets
list.addTickets
(Ticket... elements) Adds elements totickets
list.build()
Builds a newImmutableObjectTickets
.from
(ObjectTickets instance) Fill a builder with attribute values from the providedObjectTickets
instance.setAllTicketsQuery
(String allTicketsQuery) Initializes the value for theallTicketsQuery
attribute.setTickets
(Iterable<? extends Ticket> elements) Sets or replaces all elements fortickets
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedObjectTickets
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addTickets
Adds one element totickets
list.- Parameters:
element
- A tickets element- Returns:
this
builder for use in a chained invocation
-
addTickets
Adds elements totickets
list.- Parameters:
elements
- An array of tickets elements- Returns:
this
builder for use in a chained invocation
-
setTickets
@CanIgnoreReturnValue public final ImmutableObjectTickets.Builder setTickets(Iterable<? extends Ticket> elements) Sets or replaces all elements fortickets
list.- Parameters:
elements
- An iterable of tickets elements- Returns:
this
builder for use in a chained invocation
-
addAllTickets
@CanIgnoreReturnValue public final ImmutableObjectTickets.Builder addAllTickets(Iterable<? extends Ticket> elements) Adds elements totickets
list.- Parameters:
elements
- An iterable of tickets elements- Returns:
this
builder for use in a chained invocation
-
setAllTicketsQuery
@CanIgnoreReturnValue public final ImmutableObjectTickets.Builder setAllTicketsQuery(String allTicketsQuery) Initializes the value for theallTicketsQuery
attribute.- Parameters:
allTicketsQuery
- The value for allTicketsQuery- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableObjectTickets
.- Returns:
- An immutable instance of ObjectTickets
- Throws:
IllegalStateException
- if any required attributes are missing
-