com.ca.commons.datamodel
Class DataModelCollectionValue

java.lang.Object
  extended by com.ca.commons.datamodel.DataModelCollectionValue
All Implemented Interfaces:
Iterable<DataModelValue>

public final class DataModelCollectionValue
extends Object
implements Iterable<DataModelValue>

Represents a collection value which can be ordered (sequence) or not (set) and has a non-collection base type.


Field Summary
static DataModelCollectionValue EMPTY
           
 
Constructor Summary
DataModelCollectionValue(boolean ordered, DataModelValue baseValue, Collection<? extends DataModelValue> values)
           
 
Method Summary
 DataModelCollectionValue changeValue(Collection<? extends DataModelValue> values)
           
 boolean equals(Object o)
           
 DataModelValue getBaseValue()
           
 Collection<DataModelValue> getValues()
          Returns collection of DataModelValues which can be used to clear etc, but shouldn't be used to add new values.
 int hashCode()
           
 boolean isEmpty()
           
 boolean isOrdered()
           
 Iterator<DataModelValue> iterator()
           
static DataModelCollectionValue makeSet(DataModelType type, Object... values)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final DataModelCollectionValue EMPTY
Constructor Detail

DataModelCollectionValue

public DataModelCollectionValue(boolean ordered,
                                @NotNull
                                DataModelValue baseValue,
                                @NotNull
                                Collection<? extends DataModelValue> values)
Method Detail

makeSet

@NotNull
public static DataModelCollectionValue makeSet(@NotNull
                                                       DataModelType type,
                                                       Object... values)

isOrdered

public boolean isOrdered()

getValues

@NotNull
public Collection<DataModelValue> getValues()
Returns collection of DataModelValues which can be used to clear etc, but shouldn't be used to add new values.


getBaseValue

@NotNull
public DataModelValue getBaseValue()

changeValue

@NotNull
public DataModelCollectionValue changeValue(@NotNull
                                                    Collection<? extends DataModelValue> values)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

isEmpty

public boolean isEmpty()

size

public int size()

iterator

public Iterator<DataModelValue> iterator()
Specified by:
iterator in interface Iterable<DataModelValue>


Created 2011-07-14 13:27 EST