public final class PropertyStates
extends java.lang.Object
PropertyState
instances.Modifier and Type | Method and Description |
---|---|
static PropertyState |
convert(PropertyState state,
Type<?> type) |
static @NotNull PropertyState |
createProperty(java.lang.String name,
java.lang.Iterable<Value> values)
Create a multi valued
PropertyState based on a list of
Value instances. |
static PropertyState |
createProperty(java.lang.String name,
java.lang.Iterable<Value> values,
int type) |
static @NotNull PropertyState |
createProperty(java.lang.String name,
java.lang.Object value,
Type<?> type)
Create a
PropertyState . |
static @NotNull PropertyState |
createProperty(java.lang.String name,
java.lang.String value,
int type)
Create a
PropertyState from a string. |
static <T> @NotNull PropertyState |
createProperty(java.lang.String name,
T value)
Create a
PropertyState where the Type of the property state
is inferred from the runtime type of T according to the mapping
established through Type . |
static @NotNull PropertyState |
createProperty(java.lang.String name,
Value value)
Create a
PropertyState based on a Value . |
@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, Value value) throws RepositoryException
PropertyState
based on a Value
. The
Type
of the property state is determined by the
type of the value.name
- The name of the property statevalue
- The value of the property stateRepositoryException
- forwarded from value
@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, java.lang.Iterable<Value> values) throws RepositoryException
PropertyState
based on a list of
Value
instances. The Type
of the property is determined
by the type of the first value in the list or Type.STRING
if the
list is empty.name
- The name of the property statevalues
- The values of the property stateRepositoryException
- forwarded from value
public static PropertyState createProperty(java.lang.String name, java.lang.Iterable<Value> values, int type) throws RepositoryException
RepositoryException
@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, java.lang.String value, int type)
PropertyState
from a string.name
- The name of the property statevalue
- The value of the property statetype
- The type of the property state@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, java.lang.Object value, Type<?> type)
PropertyState
.name
- The name of the property statevalue
- The value of the property statetype
- The type of the property state@NotNull public static <T> @NotNull PropertyState createProperty(java.lang.String name, T value)
PropertyState
where the Type
of the property state
is inferred from the runtime type of T
according to the mapping
established through Type
.name
- The name of the property statevalue
- The value of the property statepublic static PropertyState convert(PropertyState state, Type<?> type)
Copyright © 2010 - 2020 Adobe. All Rights Reserved