org.eclipse.ocl.examples.pivot.values.impl
Class OrderedSetValueImpl

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.values.impl.AbstractValue
      extended by org.eclipse.ocl.examples.pivot.values.impl.AbstractedCollectionValue
          extended by org.eclipse.ocl.examples.pivot.values.impl.AbstractCollectionValue<OrderedSet<Value>>
              extended by org.eclipse.ocl.examples.pivot.values.impl.OrderedSetValueImpl
All Implemented Interfaces:
java.lang.Iterable<Value>, CollectionValue, OrderedCollectionValue, OrderedSetValue, UniqueCollectionValue, Value
Direct Known Subclasses:
OrderedSetValueImpl.Accumulator

public class OrderedSetValueImpl
extends AbstractCollectionValue<OrderedSet<Value>>
implements OrderedSetValue


Nested Class Summary
static class OrderedSetValueImpl.Accumulator
           
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.pivot.values.Value
Value.BinaryOperation
 
Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractCollectionValue
elements
 
Fields inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractValue
valueFactory
 
Fields inherited from interface org.eclipse.ocl.examples.pivot.values.Value
INVALID_NAME
 
Constructor Summary
OrderedSetValueImpl(ValueFactory valueFactory, java.util.Collection<? extends Value> elements)
           
OrderedSetValueImpl(ValueFactory valueFactory, OrderedSet<Value> elements)
           
OrderedSetValueImpl(ValueFactory valueFactory, Value... elements)
           
 
Method Summary
 OrderedSetValue append(Value object)
           
 OrderedCollectionValue asOrderedCollectionValue()
           
 OrderedSetValueImpl asOrderedSetValue()
           
 UniqueCollectionValue asUniqueCollectionValue()
           
 Value at(int index)
           
 boolean equals(java.lang.Object obj)
           
 OrderedSetValue excluding(Value value)
           
 Value first()
           
 OrderedSetValue flatten()
           
 CollectionKind getKind()
           
 Type getType(TypeManager typeManager, Type staticType)
           
 OrderedSetValue including(Value value)
           
 IntegerValue indexOf(Value object)
           
 OrderedSetValue insertAt(int index, Value object)
           
 Value last()
           
 OrderedSetValue minus(UniqueCollectionValue set)
           
 OrderedSetValue prepend(Value object)
           
 OrderedSetValue reverse()
           
 OrderedSetValue sort(java.util.Comparator<Value> comparator)
           
 OrderedSetValue subOrderedSet(int lower, int upper)
           
 OrderedSetValue symmetricDifference(UniqueCollectionValue set)
           
 OrderedCollectionValue toOrderedCollectionValue()
           
 void toString(java.lang.StringBuffer s, int lengthLimit)
           
static OrderedSetValue union(ValueFactory valueFactory, CollectionValue left, CollectionValue right)
           
 
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractCollectionValue
count, excludes, excludesAll, flatten, getElements, hashCode, includes, includesAll, intersection, intSize, iterator, maxMin, product, sum, union
 
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractedCollectionValue
asBagValue, asCollection, asCollectionValue, asList, asObject, asSequenceValue, asSetValue, asValidValue, isCollectionValue, isEmpty, notEmpty, size, toString
 
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractValue
asBoolean, asBooleanValue, asDouble, asElement, asElementValue, asInteger, asIntegerValue, asObjectValue, asRealValue, asString, asStringValue, asTypeValue, getValueFactory, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toRealValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.values.CollectionValue
asCollection, asList, count, excludes, excludesAll, flatten, includes, includesAll, intersection, intSize, isEmpty, iterator, maxMin, notEmpty, product, size, sum, union
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.values.Value
asBagValue, asBoolean, asBooleanValue, asCollectionValue, asDouble, asElement, asElementValue, asInteger, asIntegerValue, asObject, asObjectValue, asRealValue, asSequenceValue, asSetValue, asString, asStringValue, asTypeValue, asValidValue, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toRealValue
 

Constructor Detail

OrderedSetValueImpl

public OrderedSetValueImpl(ValueFactory valueFactory,
                           Value... elements)

OrderedSetValueImpl

public OrderedSetValueImpl(ValueFactory valueFactory,
                           java.util.Collection<? extends Value> elements)

OrderedSetValueImpl

public OrderedSetValueImpl(ValueFactory valueFactory,
                           OrderedSet<Value> elements)
Method Detail

union

public static OrderedSetValue union(ValueFactory valueFactory,
                                    CollectionValue left,
                                    CollectionValue right)
                             throws InvalidValueException
Throws:
InvalidValueException

append

public OrderedSetValue append(Value object)
                       throws InvalidValueException
Specified by:
append in interface OrderedCollectionValue
Throws:
InvalidValueException

asOrderedCollectionValue

public OrderedCollectionValue asOrderedCollectionValue()
Specified by:
asOrderedCollectionValue in interface Value
Overrides:
asOrderedCollectionValue in class AbstractValue

asOrderedSetValue

public OrderedSetValueImpl asOrderedSetValue()
Specified by:
asOrderedSetValue in interface Value
Overrides:
asOrderedSetValue in class AbstractedCollectionValue

asUniqueCollectionValue

public UniqueCollectionValue asUniqueCollectionValue()
Specified by:
asUniqueCollectionValue in interface Value
Overrides:
asUniqueCollectionValue in class AbstractValue

at

public Value at(int index)
         throws InvalidValueException
Specified by:
at in interface OrderedCollectionValue
Throws:
InvalidValueException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

excluding

public OrderedSetValue excluding(Value value)
Specified by:
excluding in interface CollectionValue

first

public Value first()
            throws InvalidValueException
Specified by:
first in interface OrderedCollectionValue
Throws:
InvalidValueException

flatten

public OrderedSetValue flatten()
                        throws InvalidValueException
Specified by:
flatten in interface CollectionValue
Throws:
InvalidValueException

getKind

public CollectionKind getKind()
Specified by:
getKind in interface CollectionValue

getType

public Type getType(TypeManager typeManager,
                    Type staticType)
Specified by:
getType in interface Value

including

public OrderedSetValue including(Value value)
                          throws InvalidValueException
Specified by:
including in interface CollectionValue
Throws:
InvalidValueException

indexOf

public IntegerValue indexOf(Value object)
                     throws InvalidValueException
Specified by:
indexOf in interface OrderedCollectionValue
Throws:
InvalidValueException

insertAt

public OrderedSetValue insertAt(int index,
                                Value object)
                         throws InvalidValueException
Specified by:
insertAt in interface OrderedCollectionValue
Throws:
InvalidValueException

last

public Value last()
           throws InvalidValueException
Specified by:
last in interface OrderedCollectionValue
Throws:
InvalidValueException

minus

public OrderedSetValue minus(UniqueCollectionValue set)
                      throws InvalidValueException
Specified by:
minus in interface UniqueCollectionValue
Throws:
InvalidValueException

prepend

public OrderedSetValue prepend(Value object)
                        throws InvalidValueException
Specified by:
prepend in interface OrderedCollectionValue
Throws:
InvalidValueException

reverse

public OrderedSetValue reverse()
Specified by:
reverse in interface OrderedCollectionValue

sort

public OrderedSetValue sort(java.util.Comparator<Value> comparator)
Specified by:
sort in interface CollectionValue

subOrderedSet

public OrderedSetValue subOrderedSet(int lower,
                                     int upper)
Specified by:
subOrderedSet in interface OrderedSetValue

symmetricDifference

public OrderedSetValue symmetricDifference(UniqueCollectionValue set)
Specified by:
symmetricDifference in interface UniqueCollectionValue

toOrderedCollectionValue

public OrderedCollectionValue toOrderedCollectionValue()
Specified by:
toOrderedCollectionValue in interface CollectionValue

toString

public void toString(java.lang.StringBuffer s,
                     int lengthLimit)
Specified by:
toString in interface Value
Overrides:
toString in class AbstractedCollectionValue