Class MultiBooleanPropertyState
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.memory.AbstractPropertyState
-
- org.apache.jackrabbit.oak.plugins.memory.EmptyPropertyState
-
- org.apache.jackrabbit.oak.plugins.memory.MultiBooleanPropertyState
-
- All Implemented Interfaces:
org.apache.jackrabbit.oak.api.PropertyState
public class MultiBooleanPropertyState extends EmptyPropertyState
-
-
Constructor Summary
Constructors Constructor Description MultiBooleanPropertyState(String name, Iterable<Boolean> values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.jackrabbit.oak.api.PropertyStatebooleanProperty(String name, Iterable<Boolean> values)Create a multi valuedPropertyStatefrom a list of booleans.intcount()Conversions.ConvertergetConverter(Boolean 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 Detail
-
values
protected final List<T> values
-
-
Method Detail
-
booleanProperty
public static org.apache.jackrabbit.oak.api.PropertyState booleanProperty(String name, Iterable<Boolean> values)
Create a multi valuedPropertyStatefrom a list of booleans.- Parameters:
name- The name of the property statevalues- The values of the property state- Returns:
- The new property state of type
Type.BOOLEANS
-
getConverter
public Conversions.Converter getConverter(Boolean value)
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
-
-