org.apache.jackrabbit.mk.model
Interface PropertyState

All Known Implementing Classes:
AbstractPropertyState

public interface PropertyState

Immutable property state. A property consists of a name and a JSON-encoded value.

Equality and hash codes

Two property states are considered equal if and only if their names and encoded values match. The Object.equals(Object) method needs to be implemented so that it complies with this definition. And while property states are not meant for use as hash keys, the Object.hashCode() method should still be implemented according to this equality contract.


Method Summary
 Iterable<Scalar> getArray()
           
 String getEncodedValue()
           
 String getName()
           
 Scalar getScalar()
           
 boolean isArray()
          Determine whether this is a multi valued property
 

Method Detail

getName

String getName()
Returns:
the name of this property state

getEncodedValue

String getEncodedValue()
Returns:
the JSON encoded value of this property state.

isArray

boolean isArray()
Determine whether this is a multi valued property

Returns:
true if and only if this is a multi valued property.

getScalar

Scalar getScalar()
Returns:
the single value of this property or null if this is a multi valued property.

getArray

Iterable<Scalar> getArray()
Returns:
an iterable of the values of this multi valued property or null if this is not a multi valued property.


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.