org.eclipse.ocl.examples.domain.values.impl
Class SetValueImpl

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.values.util.ValuesUtil
      extended by org.eclipse.ocl.examples.domain.values.impl.ValueImpl
          extended by org.eclipse.ocl.examples.domain.values.impl.CollectionValueImpl
              extended by org.eclipse.ocl.examples.domain.values.impl.SetValueImpl
All Implemented Interfaces:
java.lang.Iterable<java.lang.Object>, CollectionValue, SetValue, UniqueCollectionValue, Value
Direct Known Subclasses:
SetValueImpl.Accumulator

public class SetValueImpl
extends CollectionValueImpl
implements SetValue

Generated
NOT

Nested Class Summary
static class SetValueImpl.Accumulator
           
 
Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.domain.values.impl.CollectionValueImpl
elements, EMPTY_ITERATOR, typeId
 
Fields inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil
EMPTY_BAG, EMPTY_SET, FALSE_VALUE, INTEGER_MAX_VALUE, INTEGER_MIN_VALUE, INVALID_VALUE, LONG_MAX_VALUE, LONG_MIN_VALUE, NULL_STRING, NULL_VALUE, ONE_VALUE, TRUE_VALUE, UNLIMITED_VALUE, ZERO_VALUE
 
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value
INVALID_NAME
 
Constructor Summary
SetValueImpl(CollectionTypeId typeId, java.util.Collection<? extends java.lang.Object> boxedValues)
           
 
Method Summary
 SetValue asSetValue()
           
 UniqueCollectionValue asUniqueCollectionValue()
           
static java.util.Set<java.lang.Object> createSetOfEach(java.lang.Object[] boxedValues)
           
 boolean equals(java.lang.Object obj)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 SetValue excluding(java.lang.Object value)
           
 SetValue excludingAll(CollectionValue values)
           
 SetValue flatten()
           
 java.lang.String getKind()
           
 SetValue including(java.lang.Object value)
           
 SetValue includingAll(CollectionValue values)
           
 boolean isOrdered()
           
 boolean isUnique()
           
 SetValue minus(UniqueCollectionValue set)
           
 OrderedSetValue sort(java.util.Comparator<java.lang.Object> comparator)
           
 SetValue symmetricDifference(UniqueCollectionValue set)
           
 SequenceValue toSequenceValue()
           
 void toString(java.lang.StringBuilder s, int lengthLimit)
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.CollectionValueImpl
asBagValue, asCollection, asCollectionValue, asEcoreObject, asEcoreObject, asEcoreObjects, asList, asObject, asOrderedSetValue, asSequenceValue, checkElementsAreUnique, count, excludes, excludesAll, flatten, getBagTypeId, getElements, getElementTypeId, getObject, getOrderedSetTypeId, getSequenceTypeId, getSetTypeId, getTypeId, hashCode, includes, includesAll, initStatics, intersection, intSize, isEmpty, iterable, iterator, notEmpty, product, size, toString, union
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.ValueImpl
asDouble, asElement, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asRealValue, asTupleValue, asUnlimitedNaturalValue, getTypeName, isInvalid, isUndefined
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil
asBagValue, asBoolean, asCollectionType, asCollectionValue, asInteger, asIntegerValue, asMetaclass, asNavigableObject, asObject, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asTupleValue, asType, asUniqueCollectionValue, asUnlimitedNaturalValue, asValue, bigDecimalValueOf, bigIntegerValueOf, characterValueOf, createBagAccumulatorValue, createBagOfEach, createBagRange, createBagValue, createCollectionAccumulatorValue, createInvalidValue, createObjectValue, createOrderedSetAccumulatorValue, createOrderedSetOfEach, createOrderedSetRange, createOrderedSetValue, createRange, createSequenceAccumulatorValue, createSequenceOfEach, createSequenceRange, createSequenceRange, createSequenceValue, createSetAccumulatorValue, createSetOfEach, createSetRange, createSetValue, createTupleOfEach, createTupleValue, createTupleValue, createTypeValue, getEcoreNumber, getTypeName, initAllStatics, integerValueOf, integerValueOf, integerValueOf, integerValueOf, integerValueOf, isBoxed, isCollectionValue, isIntegerNumber, isIntegerValue, isRealNumber, isUnboxed, isUnlimited, oclToString, realValueOf, realValueOf, realValueOf, realValueOf, realValueOf, stringValueOf, throwBooleanInvalidValueException, throwInvalidValueException, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.CollectionValue
asCollection, asEcoreObject, asEcoreObject, asEcoreObjects, count, excludes, excludesAll, flatten, getElements, getTypeId, includes, includesAll, intersection, intSize, isEmpty, iterable, iterator, notEmpty, product, size, union
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value
asBagValue, asCollectionValue, asDouble, asElement, asInteger, asIntegerValue, asNavigableObject, asObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asTupleValue, asUnlimitedNaturalValue, isInvalid, isUndefined
 

Constructor Detail

SetValueImpl

public SetValueImpl(@NonNull
                    CollectionTypeId typeId,
                    @NonNull
                    java.util.Collection<? extends java.lang.Object> boxedValues)
Method Detail

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class CollectionValueImpl
Generated

createSetOfEach

@NonNull
public static java.util.Set<java.lang.Object> createSetOfEach(@NonNull
                                                                      java.lang.Object[] boxedValues)

asUniqueCollectionValue

@NonNull
public UniqueCollectionValue asUniqueCollectionValue()
Specified by:
asUniqueCollectionValue in interface Value
Overrides:
asUniqueCollectionValue in class ValueImpl

asSetValue

@NonNull
public SetValue asSetValue()
Specified by:
asSetValue in interface Value
Overrides:
asSetValue in class CollectionValueImpl

equals

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

excluding

@NonNull
public SetValue excluding(@Nullable
                                  java.lang.Object value)
Specified by:
excluding in interface CollectionValue

excludingAll

@NonNull
public SetValue excludingAll(@NonNull
                                     CollectionValue values)
Specified by:
excludingAll in interface CollectionValue

flatten

@NonNull
public SetValue flatten()
Specified by:
flatten in interface CollectionValue

getKind

@NonNull
public java.lang.String getKind()
Specified by:
getKind in interface CollectionValue

including

@NonNull
public SetValue including(@Nullable
                                  java.lang.Object value)
Specified by:
including in interface CollectionValue

includingAll

@NonNull
public SetValue includingAll(@NonNull
                                     CollectionValue values)
Specified by:
includingAll in interface CollectionValue

isOrdered

public boolean isOrdered()
Specified by:
isOrdered in interface CollectionValue

isUnique

public boolean isUnique()
Specified by:
isUnique in interface CollectionValue

minus

@NonNull
public SetValue minus(@NonNull
                              UniqueCollectionValue set)
Specified by:
minus in interface UniqueCollectionValue

sort

@NonNull
public OrderedSetValue sort(@NonNull
                                    java.util.Comparator<java.lang.Object> comparator)
Specified by:
sort in interface CollectionValue

symmetricDifference

@NonNull
public SetValue symmetricDifference(@NonNull
                                            UniqueCollectionValue set)
Specified by:
symmetricDifference in interface UniqueCollectionValue

toSequenceValue

public SequenceValue toSequenceValue()
Specified by:
toSequenceValue in interface CollectionValue

toString

public void toString(@NonNull
                     java.lang.StringBuilder s,
                     int lengthLimit)
Specified by:
toString in interface Value
Overrides:
toString in class CollectionValueImpl