public static class StaticTableSchema.GenericBuilder extends Object
Constructor and Description |
---|
GenericBuilder() |
Modifier and Type | Method and Description |
---|---|
<T> StaticTableSchema.Builder<T> |
attributes(Attribute.AttributeSupplier<T>... mappedAttributes) |
<T> StaticTableSchema.Builder<T> |
attributes(Collection<Attribute.AttributeSupplier<T>> mappedAttributes) |
<T> StaticTableSchema<T> |
build() |
<T> 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. |
<T,R> StaticTableSchema.Builder<T> |
flatten(StaticTableSchema<R> otherTableSchema,
Function<T,R> otherItemGetter,
BiConsumer<T,R> otherItemSetter) |
<T> StaticTableSchema.Builder<T> |
newItemSupplier(Supplier<T> newItemSupplier) |
StaticTableSchema.GenericBuilder |
tagWith(TableTag... tableTags) |
public <T> StaticTableSchema<T> build()
public <T> StaticTableSchema.Builder<T> newItemSupplier(Supplier<T> newItemSupplier)
public <T,R> StaticTableSchema.Builder<T> flatten(StaticTableSchema<R> otherTableSchema, Function<T,R> otherItemGetter, BiConsumer<T,R> otherItemSetter)
public <T> 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();
T
- The sub-class type of the StaticTableSchema
being built.superTableSchema
- The StaticTableSchema
of the super-class object.StaticTableSchema
under construction.@SafeVarargs public final <T> StaticTableSchema.Builder<T> attributes(Attribute.AttributeSupplier<T>... mappedAttributes)
public final <T> StaticTableSchema.Builder<T> attributes(Collection<Attribute.AttributeSupplier<T>> mappedAttributes)
public StaticTableSchema.GenericBuilder tagWith(TableTag... tableTags)
Copyright © 2019. All rights reserved.