public static final class StaticTableSchema.Builder<T> extends Object
Modifier and Type | Method and Description |
---|---|
StaticTableSchema.Builder<T> |
attributes(Attribute.AttributeSupplier<T>... mappedAttributes) |
StaticTableSchema.Builder<T> |
attributes(Collection<Attribute.AttributeSupplier<T>> mappedAttributes) |
StaticTableSchema<T> |
build() |
StaticTableSchema.Builder<T> |
extend(StaticTableSchema<? super T> superTableSchema)
Extends the
StaticTableSchema of a super-class, effectively rolling all the attributes modelled by
the super-class into the StaticTableSchema of the sub-class. |
<R> StaticTableSchema.Builder<T> |
flatten(StaticTableSchema<R> otherTableSchema,
Function<T,R> otherItemGetter,
BiConsumer<T,R> otherItemSetter) |
StaticTableSchema.Builder<T> |
newItemSupplier(Supplier<T> newItemSupplier) |
StaticTableSchema.Builder<T> |
tagWith(TableTag... tableTags) |
public StaticTableSchema.Builder<T> newItemSupplier(Supplier<T> newItemSupplier)
@SafeVarargs public final StaticTableSchema.Builder<T> attributes(Attribute.AttributeSupplier<T>... mappedAttributes)
public StaticTableSchema.Builder<T> attributes(Collection<Attribute.AttributeSupplier<T>> mappedAttributes)
public <R> StaticTableSchema.Builder<T> flatten(StaticTableSchema<R> otherTableSchema, Function<T,R> otherItemGetter, BiConsumer<T,R> otherItemSetter)
public StaticTableSchema.Builder<T> extend(StaticTableSchema<? super T> superTableSchema)
StaticTableSchema
of a super-class, effectively rolling all the attributes modelled by
the super-class into the StaticTableSchema
of the sub-class. If you are extending an abstract
table schema that has no inferred type (due to having no attributes or a newItemSupplier) the compiler
will not be able to correctly infer the type of the sub-class. To overcome this, specify the type
explicitly as this example illustrates:
StaticTableSchema.builder().<Subclass>extend(superclassTableSchema).build();
superTableSchema
- The StaticTableSchema
of the super-class object.StaticTableSchema
under construction.public StaticTableSchema.Builder<T> tagWith(TableTag... tableTags)
public StaticTableSchema<T> build()
Copyright © 2020. All rights reserved.