public abstract class EmptyPropertyState extends AbstractPropertyState
PropertyState implementations
providing default implementation which correspond to a property
without any value.| Modifier and Type | Method and Description |
|---|---|
int |
count()
The number of values of this property.
|
static PropertyState |
emptyProperty(java.lang.String name,
Type<?> type)
Create an empty
PropertyState |
@NotNull java.lang.String |
getName() |
<T> T |
getValue(Type<T> type)
Value of this property.
|
<T> T |
getValue(Type<T> type,
int index)
Value at the given
index. |
boolean |
isArray()
Determine whether the value is an array of atoms
|
long |
size()
The size of the value of this property.
|
long |
size(int index)
The size of the value at the given
index. |
equal, equals, hashCode, hashCode, toString, toStringgetTypepublic static PropertyState emptyProperty(java.lang.String name, Type<?> type)
PropertyStatename - The name of the property statetype - The type of the property statejava.lang.IllegalArgumentException - if @code type.isArray()} is false.@NotNull public @NotNull java.lang.String getName()
public boolean isArray()
PropertyStatetrue@NotNull public <T> T getValue(Type<T> type)
PropertyStatetype
argument. If type.isArray() is true, this method returns an
Iterable of the base type of
type containing all values of this property.
If the target type is not the same as the type of this property an attempt
is made to convert the value to the target type. If the conversion fails an
exception is thrown. The actual conversions which take place are those defined
in the org.apache.jackrabbit.oak.plugins.value.Conversions class.type - target typetype.isArray() is true.java.lang.IllegalStateException - type.isArray() is false.@NotNull public <T> T getValue(Type<T> type, int index)
PropertyStateindex.
The type of the return value is determined by the target type
argument.
If the target type is not the same as the type of this property an attempt
is made to convert the value to the target type. If the conversion fails an
exception is thrown. The actual conversions which take place are those defined
in the org.apache.jackrabbit.oak.plugins.value.Conversions class.type - target typeindexjava.lang.IndexOutOfBoundsException - alwayspublic long size()
PropertyStatejava.lang.IllegalStateException - alwayspublic long size(int index)
PropertyStateindex.index.java.lang.IndexOutOfBoundsException - alwayspublic int count()
PropertyState1 for atoms.0Copyright © 2010 - 2023 Adobe. All Rights Reserved