T - public class PropertyBuilder<T>
extends java.lang.Object
PropertyBuilder for building in memory PropertyState instances.| Constructor and Description |
|---|
PropertyBuilder(Type<T> type)
Create a new instance for building
PropertyState instances
of the given type. |
| Modifier and Type | Method and Description |
|---|---|
@NotNull PropertyBuilder<T> |
addValue(T value) |
@NotNull PropertyBuilder<T> |
addValues(java.lang.Iterable<T> values) |
static <T> PropertyBuilder<T> |
array(Type<T> type)
Create a new instance for building array
PropertyState instances
of the given type. |
static <T> PropertyBuilder<T> |
array(Type<T> type,
java.lang.String name)
Create a new instance for building array
PropertyState instances
of the given type. |
@NotNull PropertyBuilder<T> |
assignFrom(PropertyState property) |
static <T> PropertyBuilder<T> |
copy(Type<T> type,
PropertyState property)
Create a new instance for building
PropertyState instances
of the given type. |
int |
count() |
java.lang.String |
getName() |
@NotNull PropertyState |
getPropertyState() |
T |
getValue() |
T |
getValue(int index) |
@NotNull java.util.List<T> |
getValues() |
boolean |
hasValue(java.lang.Object value) |
boolean |
isArray() |
boolean |
isEmpty() |
@NotNull PropertyBuilder<T> |
removeValue(int index) |
@NotNull PropertyBuilder<T> |
removeValue(java.lang.Object value) |
static <T> PropertyBuilder<T> |
scalar(Type<T> type)
Create a new instance for building scalar
PropertyState instances
of the given type. |
static <T> PropertyBuilder<T> |
scalar(Type<T> type,
java.lang.String name)
Create a new instance for building scalar
PropertyState instances
of the given type. |
@NotNull PropertyBuilder<T> |
setArray() |
@NotNull PropertyBuilder<T> |
setName(java.lang.String name) |
@NotNull PropertyBuilder<T> |
setScalar() |
@NotNull PropertyBuilder<T> |
setValue(T value) |
@NotNull PropertyBuilder<T> |
setValue(T value,
int index) |
@NotNull PropertyBuilder<T> |
setValues(java.lang.Iterable<T> values) |
public static <T> PropertyBuilder<T> scalar(Type<T> type)
PropertyState instances
of the given type.type - type of the PropertyState instances to be built.PropertyBuilder for typepublic static <T> PropertyBuilder<T> array(Type<T> type)
PropertyState instances
of the given type.type - type of the PropertyState instances to be built.PropertyBuilder for typepublic static <T> PropertyBuilder<T> scalar(Type<T> type, java.lang.String name)
PropertyState instances
of the given type. The builder is initialised with the
given name.
Equivalent to
MemoryPropertyBuilder.create(type).setName(name);
type - type of the PropertyState instances to be built.name - initial namePropertyBuilder for typepublic static <T> PropertyBuilder<T> array(Type<T> type, java.lang.String name)
PropertyState instances
of the given type. The builder is initialised with the
given name.
Equivalent to
MemoryPropertyBuilder.create(type).setName(name).setArray();
type - type of the PropertyState instances to be built.name - initial namePropertyBuilder for typepublic static <T> PropertyBuilder<T> copy(Type<T> type, PropertyState property)
PropertyState instances
of the given type. The builder is initialised with the name and
the values of property.
Equivalent to
PropertyBuilder.scalar(type).assignFrom(property);
type - type of the PropertyState instances to be built.property - initial name and valuesPropertyBuilder for typepublic java.lang.String getName()
public T getValue()
@NotNull public @NotNull java.util.List<T> getValues()
public T getValue(int index)
public boolean hasValue(java.lang.Object value)
public int count()
public boolean isArray()
public boolean isEmpty()
@NotNull public @NotNull PropertyState getPropertyState()
@NotNull public @NotNull PropertyBuilder<T> assignFrom(PropertyState property)
@NotNull public @NotNull PropertyBuilder<T> setName(java.lang.String name)
@NotNull public @NotNull PropertyBuilder<T> setArray()
@NotNull public @NotNull PropertyBuilder<T> setScalar()
@NotNull public @NotNull PropertyBuilder<T> setValue(T value)
@NotNull public @NotNull PropertyBuilder<T> addValue(T value)
@NotNull public @NotNull PropertyBuilder<T> addValues(java.lang.Iterable<T> values)
@NotNull public @NotNull PropertyBuilder<T> setValue(T value, int index)
@NotNull public @NotNull PropertyBuilder<T> setValues(java.lang.Iterable<T> values)
@NotNull public @NotNull PropertyBuilder<T> removeValue(int index)
@NotNull public @NotNull PropertyBuilder<T> removeValue(java.lang.Object value)
Copyright © 2010 - 2023 Adobe. All Rights Reserved