public class SegmentPropertyState extends Object implements PropertyState
Depending on the property type, this is a record of type "VALUE" or a record of type "LIST" (for arrays).
GET_NAME
Constructor and Description |
---|
SegmentPropertyState(RecordId id,
org.apache.jackrabbit.oak.plugins.segment.PropertyTemplate template) |
Modifier and Type | Method and Description |
---|---|
int |
count()
The number of values of this property.
|
boolean |
equals(Object object) |
String |
getName() |
RecordId |
getRecordId()
Returns the identifier of this record.
|
Type<?> |
getType()
Determine the type of this property
|
<T> T |
getValue(Type<T> type)
Value of this property.
|
<T> T |
getValue(Type<T> type,
int index)
Value at the given
index . |
int |
hashCode() |
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 . |
String |
toString() |
public SegmentPropertyState(RecordId id, org.apache.jackrabbit.oak.plugins.segment.PropertyTemplate template)
public String getName()
getName
in interface PropertyState
public Type<?> getType()
PropertyState
getType
in interface PropertyState
public boolean isArray()
PropertyState
isArray
in interface PropertyState
true
if and only if the value is an array of atoms.public int count()
PropertyState
1
for atoms.count
in interface PropertyState
public <T> T getValue(Type<T> type)
PropertyState
type
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 Conversions
class.getValue
in interface PropertyState
type
- target typepublic long size()
PropertyState
size
in interface PropertyState
public <T> T getValue(Type<T> type, int index)
PropertyState
index
.
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 Conversions
class.getValue
in interface PropertyState
type
- target typeindex
public long size(int index)
PropertyState
index
.size
in interface PropertyState
index
.public boolean equals(Object object)
public int hashCode()
public String toString()
public RecordId getRecordId()
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"