T
- @PublicApi public class AttributeSpecBuilder<T> extends Object
Modifier and Type | Class and Description |
---|---|
class |
AttributeSpecBuilder.ParamsBuilder<P>
Parameter builder class, used to set specific parameters.
|
Constructor and Description |
---|
AttributeSpecBuilder() |
Modifier and Type | Method and Description |
---|---|
AttributeSpec<T> |
build()
Builds the attribute spec.
|
static AttributeSpecBuilder<Void> |
create()
Creates an empty builder.
|
static <T> AttributeSpecBuilder<T> |
create(AttributeSpec<T> sample)
Creates a builder based on the given sample.
|
static AttributeSpecBuilder<Void> |
create(String id)
Creates a builder with the given attribute ID.
|
static <T> AttributeSpecBuilder<T> |
create(String id,
ValueFormat<T> format)
Creates a builder with the given attribute ID and format.
|
static <T> AttributeSpecBuilder<T> |
create(String id,
ValueFormat<T> format,
Map<String,Object> params)
Creates a builder with the given attribute ID, format and parameters.
|
boolean |
equals(Object o) |
int |
hashCode() |
AttributeSpecBuilder.ParamsBuilder<AttributeSpecBuilder<T>> |
params()
Provides access to
AttributeSpecBuilder.ParamsBuilder , which is used to build parameter map. |
<R> AttributeSpecBuilder<R> |
setFormat(ValueFormat<R> format)
Sets the value format.
|
AttributeSpecBuilder<T> |
setId(String id)
Sets the attribute id.
|
String |
toString() |
@NotNull public static AttributeSpecBuilder<Void> create()
@NotNull public static AttributeSpecBuilder<Void> create(@Nullable String id)
id
- attribute id@NotNull public static <T> AttributeSpecBuilder<T> create(@Nullable String id, @Nullable ValueFormat<T> format)
id
- attribute idformat
- value format@NotNull public static <T> AttributeSpecBuilder<T> create(@Nullable String id, @Nullable ValueFormat<T> format, @Nullable Map<String,Object> params)
id
- attribute idformat
- value formatparams
- parameters mappublic static <T> AttributeSpecBuilder<T> create(AttributeSpec<T> sample)
sample
- sample attribute spec@NotNull public AttributeSpec<T> build()
IllegalArgumentException
- if there's anything wrong with id, format or parameterspublic AttributeSpecBuilder<T> setId(String id)
id
- attribute idpublic <R> AttributeSpecBuilder<R> setFormat(ValueFormat<R> format)
format
- value formatpublic AttributeSpecBuilder.ParamsBuilder<AttributeSpecBuilder<T>> params()
AttributeSpecBuilder.ParamsBuilder
, which is used to build parameter map.Copyright © 2024 Tempo Software. All Rights Reserved.