@NotThreadSafe public static final class ImmutableTableMeta.Builder extends Object
ImmutableTableMeta.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableTableMeta.Builder |
addAllColumns(Iterable<? extends ColumnMeta> elements)
Adds elements to
columns list. |
ImmutableTableMeta.Builder |
addColumns(ColumnMeta... elements)
Adds elements to
columns list. |
ImmutableTableMeta.Builder |
addColumns(ColumnMeta element)
Adds one element to
columns list. |
ImmutableTableMeta |
build()
Builds a new
ImmutableTableMeta. |
ImmutableTableMeta.Builder |
columns(Iterable<? extends ColumnMeta> elements)
Sets or replaces all elements for
columns list. |
ImmutableTableMeta.Builder |
comment(Optional<String> comment)
Initializes the optional value
comment to comment. |
ImmutableTableMeta.Builder |
comment(String comment)
Initializes the optional value
comment to comment. |
ImmutableTableMeta.Builder |
count(long count)
Initializes the optional value
count to count. |
ImmutableTableMeta.Builder |
count(Optional<Long> count)
Initializes the optional value
count to count. |
ImmutableTableMeta.Builder |
from(TableMeta instance)
Fill a builder with attribute values from the provided
TableMeta instance. |
ImmutableTableMeta.Builder |
isView(boolean isView)
Initializes the value for the
isView attribute. |
ImmutableTableMeta.Builder |
name(String name)
Initializes the value for the
name attribute. |
@CanIgnoreReturnValue public final ImmutableTableMeta.Builder from(TableMeta instance)
TableMeta 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.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder isView(boolean isView)
isView attribute.isView - The value for isViewthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder addColumns(ColumnMeta element)
columns list.element - A columns elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder addColumns(ColumnMeta... elements)
columns list.elements - An array of columns elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder columns(Iterable<? extends ColumnMeta> elements)
columns list.elements - An iterable of columns elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder addAllColumns(Iterable<? extends ColumnMeta> elements)
columns list.elements - An iterable of columns elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder count(long count)
count to count.count - The value for countthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder count(Optional<Long> count)
count to count.count - The value for countthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder comment(String comment)
comment to comment.comment - The value for commentthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableTableMeta.Builder comment(Optional<String> comment)
comment to comment.comment - The value for commentthis builder for use in a chained invocationpublic ImmutableTableMeta build()
ImmutableTableMeta.IllegalStateException - if any required attributes are missingCopyright © 2019–2021 Nuiton. All rights reserved.