public class MultiGenericPropertyState extends EmptyPropertyState
| Constructor and Description |
|---|
MultiGenericPropertyState(String name,
Iterable<String> values,
org.apache.jackrabbit.oak.api.Type<?> type) |
| Modifier and Type | Method and Description |
|---|---|
int |
count() |
static org.apache.jackrabbit.oak.api.PropertyState |
dateProperty(String name,
Iterable<String> values)
Create a multi valued
PropertyState from a list of dates. |
Conversions.Converter |
getConverter(String value)
Create a converter for converting a value to other types.
|
org.apache.jackrabbit.oak.api.Type<?> |
getType() |
<S> S |
getValue(org.apache.jackrabbit.oak.api.Type<S> type) |
<S> S |
getValue(org.apache.jackrabbit.oak.api.Type<S> type,
int index) |
static org.apache.jackrabbit.oak.api.PropertyState |
nameProperty(String name,
Iterable<String> values)
Create a multi valued
PropertyState from a list of names. |
static org.apache.jackrabbit.oak.api.PropertyState |
pathProperty(String name,
Iterable<String> values)
Create a multi valued
PropertyState from a list of paths. |
static org.apache.jackrabbit.oak.api.PropertyState |
referenceProperty(String name,
Iterable<String> values)
Create a multi valued
PropertyState from a list of references. |
long |
size(int index) |
static org.apache.jackrabbit.oak.api.PropertyState |
uriProperty(String name,
Iterable<String> values)
Create a multi valued
PropertyState from a list of URIs. |
static org.apache.jackrabbit.oak.api.PropertyState |
weakreferenceProperty(String name,
Iterable<String> values)
Create a multi valued
PropertyState from a list of weak references. |
emptyProperty, getName, isArray, sizepublic MultiGenericPropertyState(String name, Iterable<String> values, org.apache.jackrabbit.oak.api.Type<?> type)
IllegalArgumentException - if type.isArray() is falsepublic static org.apache.jackrabbit.oak.api.PropertyState dateProperty(String name, Iterable<String> values)
PropertyState from a list of dates.name - The name of the property statevalues - The values of the property stateType.DATESpublic static org.apache.jackrabbit.oak.api.PropertyState nameProperty(String name, Iterable<String> values)
PropertyState from a list of names.
No validation is performed on the strings passed for values.name - The name of the property statevalues - The values of the property stateType.NAMESpublic static org.apache.jackrabbit.oak.api.PropertyState pathProperty(String name, Iterable<String> values)
PropertyState from a list of paths.
No validation is performed on the strings passed for values.name - The name of the property statevalues - The values of the property stateType.PATHSpublic static org.apache.jackrabbit.oak.api.PropertyState referenceProperty(String name, Iterable<String> values)
PropertyState from a list of references.
No validation is performed on the strings passed for values.name - The name of the property statevalues - The values of the property stateType.REFERENCESpublic static org.apache.jackrabbit.oak.api.PropertyState weakreferenceProperty(String name, Iterable<String> values)
PropertyState from a list of weak references.
No validation is performed on the strings passed for values.name - The name of the property statevalues - The values of the property stateType.WEAKREFERENCESpublic static org.apache.jackrabbit.oak.api.PropertyState uriProperty(String name, Iterable<String> values)
PropertyState from a list of URIs.
No validation is performed on the strings passed for values.name - The name of the property statevalues - The values of the property stateType.URISpublic Conversions.Converter getConverter(String value)
value - The value to convertpublic org.apache.jackrabbit.oak.api.Type<?> getType()
@NotNull public <S> S getValue(org.apache.jackrabbit.oak.api.Type<S> type)
getValue in interface org.apache.jackrabbit.oak.api.PropertyStategetValue in class EmptyPropertyStatetype.isArray() is true.IllegalStateException - if type.isArray() is false.IllegalArgumentException - if type is not one of the
values defined in Type@NotNull public <S> S getValue(org.apache.jackrabbit.oak.api.Type<S> type, int index)
getValue in interface org.apache.jackrabbit.oak.api.PropertyStategetValue in class EmptyPropertyStateIllegalArgumentException - if type is not one of the
values defined in Type or if type.isArray() is trueIndexOutOfBoundsException - if index >= count().public final int count()
count in interface org.apache.jackrabbit.oak.api.PropertyStatecount in class EmptyPropertyState0public long size(int index)
size in interface org.apache.jackrabbit.oak.api.PropertyStatesize in class EmptyPropertyStateCopyright © 2012–2021 The Apache Software Foundation. All rights reserved.