T
- the class of the item this attribute maps into.R
- the class that the value of this attribute converts to.public static final class ImmutableAttribute.Builder<T,B,R> extends Object
ImmutableAttribute
.Modifier and Type | Method and Description |
---|---|
ImmutableAttribute.Builder<T,B,R> |
addTag(StaticAttributeTag tag)
Associates a single
StaticAttributeTag with this attribute. |
ImmutableAttribute.Builder<T,B,R> |
attributeConverter(AttributeConverter<R> attributeConverter)
An
AttributeConverter for the attribute type (EnhancedType ), that can convert this attribute. |
ImmutableAttribute<T,B,R> |
build()
Builds a
StaticAttributeTag from the values stored in this builder. |
ImmutableAttribute.Builder<T,B,R> |
getter(Function<T,R> getter)
A function that can get the value of this attribute from a modelled item it composes.
|
ImmutableAttribute.Builder<T,B,R> |
name(String name)
The name of this attribute
|
ImmutableAttribute.Builder<T,B,R> |
setter(BiConsumer<B,R> setter)
A function that can set the value of this attribute on a modelled item it composes.
|
ImmutableAttribute.Builder<T,B,R> |
tags(Collection<StaticAttributeTag> tags)
A collection of
StaticAttributeTag associated with this attribute. |
ImmutableAttribute.Builder<T,B,R> |
tags(StaticAttributeTag... tags)
A collection of
StaticAttributeTag associated with this attribute. |
public ImmutableAttribute.Builder<T,B,R> name(String name)
public ImmutableAttribute.Builder<T,B,R> getter(Function<T,R> getter)
public ImmutableAttribute.Builder<T,B,R> setter(BiConsumer<B,R> setter)
public ImmutableAttribute.Builder<T,B,R> tags(Collection<StaticAttributeTag> tags)
StaticAttributeTag
associated with this attribute. Overwrites any existing tags.public ImmutableAttribute.Builder<T,B,R> tags(StaticAttributeTag... tags)
StaticAttributeTag
associated with this attribute. Overwrites any existing tags.public ImmutableAttribute.Builder<T,B,R> addTag(StaticAttributeTag tag)
StaticAttributeTag
with this attribute. Adds to any existing tags.public ImmutableAttribute.Builder<T,B,R> attributeConverter(AttributeConverter<R> attributeConverter)
AttributeConverter
for the attribute type (EnhancedType
), that can convert this attribute.
It takes precedence over any converter for this type provided by the table schema
AttributeConverterProvider
.public ImmutableAttribute<T,B,R> build()
StaticAttributeTag
from the values stored in this builder.Copyright © 2021. All rights reserved.