Class PropertyBuilder<T>
java.lang.Object
org.apache.jackrabbit.oak.plugins.memory.PropertyBuilder<T>
- Type Parameters:
T
-
PropertyBuilder
for building in memory PropertyState
instances.-
Constructor Summary
ConstructorsConstructorDescriptionPropertyBuilder
(Type<T> type) Create a new instance for buildingPropertyState
instances of the giventype
. -
Method Summary
Modifier and TypeMethodDescription@NotNull PropertyBuilder<T>
@NotNull PropertyBuilder<T>
static <T> PropertyBuilder<T>
Create a new instance for building arrayPropertyState
instances of the giventype
.static <T> PropertyBuilder<T>
Create a new instance for building arrayPropertyState
instances of the giventype
.@NotNull PropertyBuilder<T>
assignFrom
(PropertyState property) static <T> PropertyBuilder<T>
copy
(Type<T> type, PropertyState property) Create a new instance for buildingPropertyState
instances of the giventype
.int
count()
getName()
@NotNull PropertyState
getValue()
getValue
(int index) boolean
boolean
isArray()
boolean
isEmpty()
@NotNull PropertyBuilder<T>
removeValue
(int index) @NotNull PropertyBuilder<T>
removeValue
(Object value) static <T> PropertyBuilder<T>
Create a new instance for building scalarPropertyState
instances of the giventype
.static <T> PropertyBuilder<T>
Create a new instance for building scalarPropertyState
instances of the giventype
.@NotNull PropertyBuilder<T>
setArray()
@NotNull PropertyBuilder<T>
@NotNull PropertyBuilder<T>
@NotNull PropertyBuilder<T>
@NotNull PropertyBuilder<T>
@NotNull PropertyBuilder<T>
-
Constructor Details
-
PropertyBuilder
Create a new instance for buildingPropertyState
instances of the giventype
.- Parameters:
type
- type of thePropertyState
instances to be built.- Throws:
IllegalArgumentException
- iftype.isArray()
istrue
.
-
-
Method Details
-
scalar
Create a new instance for building scalarPropertyState
instances of the giventype
.- Parameters:
type
- type of thePropertyState
instances to be built.- Returns:
PropertyBuilder
fortype
-
array
Create a new instance for building arrayPropertyState
instances of the giventype
.- Parameters:
type
- type of thePropertyState
instances to be built.- Returns:
PropertyBuilder
fortype
-
scalar
Create a new instance for building scalarPropertyState
instances of the giventype
. The builder is initialised with the givenname
. Equivalent toMemoryPropertyBuilder.create(type).setName(name);
- Parameters:
type
- type of thePropertyState
instances to be built.name
- initial name- Returns:
PropertyBuilder
fortype
-
array
Create a new instance for building arrayPropertyState
instances of the giventype
. The builder is initialised with the givenname
. Equivalent toMemoryPropertyBuilder.create(type).setName(name).setArray();
- Parameters:
type
- type of thePropertyState
instances to be built.name
- initial name- Returns:
PropertyBuilder
fortype
-
copy
Create a new instance for buildingPropertyState
instances of the giventype
. The builder is initialised with the name and the values ofproperty
. Equivalent toPropertyBuilder.scalar(type).assignFrom(property);
- Parameters:
type
- type of thePropertyState
instances to be built.property
- initial name and values- Returns:
PropertyBuilder
fortype
-
getName
-
getValue
-
getValues
-
getValue
-
hasValue
-
count
public int count() -
isArray
public boolean isArray() -
isEmpty
public boolean isEmpty() -
getPropertyState
-
assignFrom
-
setName
-
setArray
-
setScalar
-
setValue
-
addValue
-
addValues
-
setValue
-
setValues
-
removeValue
-
removeValue
-