Class MultiDoublePropertyState
java.lang.Object
org.apache.jackrabbit.oak.plugins.memory.AbstractPropertyState
org.apache.jackrabbit.oak.plugins.memory.EmptyPropertyState
org.apache.jackrabbit.oak.plugins.memory.MultiDoublePropertyState
- All Implemented Interfaces:
org.apache.jackrabbit.oak.api.PropertyState
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intcount()static org.apache.jackrabbit.oak.api.PropertyStatedoubleProperty(String name, Iterable<Double> values) Create a multi valuedPropertyStatefrom a list of doubles.getConverter(Double value) Create a converter for converting a value to other types.org.apache.jackrabbit.oak.api.Type<?>getType()<S> SgetValue(org.apache.jackrabbit.oak.api.Type<S> type) <S> SgetValue(org.apache.jackrabbit.oak.api.Type<S> type, int index) longsize(int index) Methods inherited from class org.apache.jackrabbit.oak.plugins.memory.EmptyPropertyState
emptyProperty, getName, isArray, size
-
Field Details
-
values
-
-
Constructor Details
-
MultiDoublePropertyState
-
-
Method Details
-
doubleProperty
public static org.apache.jackrabbit.oak.api.PropertyState doubleProperty(String name, Iterable<Double> values) Create a multi valuedPropertyStatefrom a list of doubles.- Parameters:
name- The name of the property statevalues- The values of the property state- Returns:
- The new property state of type
Type.DOUBLES
-
getConverter
Create a converter for converting a value to other types.- Parameters:
value- The value to convert- Returns:
- A converter for the value of this property
-
getType
public org.apache.jackrabbit.oak.api.Type<?> getType() -
getValue
@NotNull public <S> S getValue(org.apache.jackrabbit.oak.api.Type<S> type) - Specified by:
getValuein interfaceorg.apache.jackrabbit.oak.api.PropertyState- Overrides:
getValuein classEmptyPropertyState- Returns:
- An empty list if
type.isArray()istrue. - Throws:
IllegalStateException- iftype.isArray()isfalse.IllegalArgumentException- iftypeis not one of the values defined inType
-
getValue
@NotNull public <S> S getValue(org.apache.jackrabbit.oak.api.Type<S> type, int index) - Specified by:
getValuein interfaceorg.apache.jackrabbit.oak.api.PropertyState- Overrides:
getValuein classEmptyPropertyState- Throws:
IllegalArgumentException- iftypeis not one of the values defined inTypeor iftype.isArray()istrueIndexOutOfBoundsException- ifindex >= count().
-
count
public final int count()- Specified by:
countin interfaceorg.apache.jackrabbit.oak.api.PropertyState- Overrides:
countin classEmptyPropertyState- Returns:
0
-
size
public long size(int index) - Specified by:
sizein interfaceorg.apache.jackrabbit.oak.api.PropertyState- Overrides:
sizein classEmptyPropertyState
-