Class TextLineItemBuilder
- All Implemented Interfaces:
Builder<TextLineItem>
Example to create an instance using the builder pattern
TextLineItem textLineItem = TextLineItem.builder()
.addedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.id("{id}")
.name(nameBuilder -> nameBuilder)
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddedAt
(ZonedDateTime addedAt) Date and time (UTC) the TextLineItem was added to the ShoppingList.build()
builds TextLineItem with checking for non-null required valuesbuilds TextLineItem without checking for non-null required valuescustom
(CustomFields custom) Custom Fields of the TextLineItem.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the TextLineItem.description
(LocalizedString description) Description of the TextLineItem.Description of the TextLineItem.Date and time (UTC) the TextLineItem was added to the ShoppingList.Custom Fields of the TextLineItem.Description of the TextLineItem.getId()
Unique identifier of the TextLineItem.getKey()
User-defined identifier of the TextLineItem.getName()
Name of the TextLineItem.Number of entries in the TextLineItem.Unique identifier of the TextLineItem.User-defined identifier of the TextLineItem.name
(LocalizedString name) Name of the TextLineItem.Name of the TextLineItem.static TextLineItemBuilder
of()
factory method for an instance of TextLineItemBuilderstatic TextLineItemBuilder
of
(TextLineItem template) create builder for TextLineItem instanceNumber of entries in the TextLineItem.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the TextLineItem.Description of the TextLineItem.Name of the TextLineItem.
-
Constructor Details
-
TextLineItemBuilder
public TextLineItemBuilder()
-
-
Method Details
-
addedAt
Date and time (UTC) the TextLineItem was added to the ShoppingList.
- Parameters:
addedAt
- value to be set- Returns:
- Builder
-
custom
Custom Fields of the TextLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the TextLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the TextLineItem.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
description
public TextLineItemBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the TextLineItem.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public TextLineItemBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the TextLineItem.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the TextLineItem.
- Parameters:
description
- value to be set- Returns:
- Builder
-
id
Unique identifier of the TextLineItem.
- Parameters:
id
- value to be set- Returns:
- Builder
-
key
User-defined identifier of the TextLineItem. It is unique per ShoppingList.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the TextLineItem.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the TextLineItem.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the TextLineItem.
- Parameters:
name
- value to be set- Returns:
- Builder
-
quantity
Number of entries in the TextLineItem.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getAddedAt
Date and time (UTC) the TextLineItem was added to the ShoppingList.
- Returns:
- addedAt
-
getCustom
Custom Fields of the TextLineItem.
- Returns:
- custom
-
getDescription
Description of the TextLineItem.
- Returns:
- description
-
getId
Unique identifier of the TextLineItem.
- Returns:
- id
-
getKey
User-defined identifier of the TextLineItem. It is unique per ShoppingList.
- Returns:
- key
-
getName
Name of the TextLineItem.
- Returns:
- name
-
getQuantity
Number of entries in the TextLineItem.
- Returns:
- quantity
-
build
builds TextLineItem with checking for non-null required values- Specified by:
build
in interfaceBuilder<TextLineItem>
- Returns:
- TextLineItem
-
buildUnchecked
builds TextLineItem without checking for non-null required values- Returns:
- TextLineItem
-
of
factory method for an instance of TextLineItemBuilder- Returns:
- builder
-
of
create builder for TextLineItem instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-