T
- public class PropertyBuilder<T> extends 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 |
---|---|
PropertyBuilder<T> |
addValue(T value) |
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,
String name)
Create a new instance for building array
PropertyState instances
of the given type . |
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() |
String |
getName() |
PropertyState |
getPropertyState() |
T |
getValue() |
T |
getValue(int index) |
List<T> |
getValues() |
boolean |
hasValue(Object value) |
boolean |
isArray() |
boolean |
isEmpty() |
PropertyBuilder<T> |
removeValue(int index) |
PropertyBuilder<T> |
removeValue(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,
String name)
Create a new instance for building scalar
PropertyState instances
of the given type . |
PropertyBuilder<T> |
setArray() |
PropertyBuilder<T> |
setName(String name) |
PropertyBuilder<T> |
setScalar() |
PropertyBuilder<T> |
setValue(T value) |
PropertyBuilder<T> |
setValue(T value,
int index) |
PropertyBuilder<T> |
setValues(Iterable<T> values) |
public PropertyBuilder(Type<T> type)
PropertyState
instances
of the given type
.type
- type of the PropertyState
instances to be built.IllegalArgumentException
- if type.isArray()
is true
.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 type
public 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 type
public static <T> PropertyBuilder<T> scalar(Type<T> type, 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 type
public static <T> PropertyBuilder<T> array(Type<T> type, 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 type
public 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 type
public String getName()
public T getValue()
public T getValue(int index)
public boolean hasValue(Object value)
public int count()
public boolean isArray()
public boolean isEmpty()
public PropertyState getPropertyState()
public PropertyBuilder<T> assignFrom(PropertyState property)
public PropertyBuilder<T> setName(String name)
public PropertyBuilder<T> setArray()
public PropertyBuilder<T> setScalar()
public PropertyBuilder<T> setValue(T value)
public PropertyBuilder<T> addValue(T value)
public PropertyBuilder<T> setValue(T value, int index)
public PropertyBuilder<T> setValues(Iterable<T> values)
public PropertyBuilder<T> removeValue(int index)
public PropertyBuilder<T> removeValue(Object value)
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"