Class MultiBinaryPropertyState
java.lang.Object
org.apache.jackrabbit.oak.plugins.memory.AbstractPropertyState
org.apache.jackrabbit.oak.plugins.memory.EmptyPropertyState
org.apache.jackrabbit.oak.plugins.memory.MultiBinaryPropertyState
- All Implemented Interfaces:
org.apache.jackrabbit.oak.api.PropertyState
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultiBinaryPropertyState(String name, Iterable<org.apache.jackrabbit.oak.api.Blob> values) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jackrabbit.oak.api.PropertyStatebinaryPropertyFromArray(String name, Iterable<byte[]> values) Create a multi valuedPropertyStatefrom a list of byte arrays.static org.apache.jackrabbit.oak.api.PropertyStatebinaryPropertyFromBlob(String name, Iterable<org.apache.jackrabbit.oak.api.Blob> values) Create a multi valuedPropertyStatefrom a list ofBlob.final intcount()getConverter(org.apache.jackrabbit.oak.api.Blob 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
-
MultiBinaryPropertyState
-
-
Method Details
-
binaryPropertyFromBlob
public static org.apache.jackrabbit.oak.api.PropertyState binaryPropertyFromBlob(String name, Iterable<org.apache.jackrabbit.oak.api.Blob> values) Create a multi valuedPropertyStatefrom a list ofBlob.- Parameters:
name- The name of the property statevalues- The values of the property state- Returns:
- The new property state of type
Type.BINARIES
-
binaryPropertyFromArray
public static org.apache.jackrabbit.oak.api.PropertyState binaryPropertyFromArray(String name, Iterable<byte[]> values) Create a multi valuedPropertyStatefrom a list of byte arrays.- Parameters:
name- The name of the property statevalues- The values of the property state- Returns:
- The new property state of type
Type.BINARIES
-
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
-