public class SetValueImpl extends CollectionValueImpl implements SetValue
Modifier and Type | Class and Description |
---|---|
static class |
SetValueImpl.Accumulator |
elements, EMPTY_ITERATOR, typeId
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
INVALID_NAME
Constructor and Description |
---|
SetValueImpl(CollectionTypeId typeId,
java.util.Collection<? extends java.lang.Object> boxedValues) |
Modifier and Type | Method and Description |
---|---|
BagValue |
asBagValue()
Add a value to a working collection, returning true if the working
collection is changed by the addition.
|
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) |
BagValue |
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) |
asCollection, asCollectionValue, asEcoreObject, 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
asDouble, asElement, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asRealValue, asTupleValue, asUnlimitedNaturalValue, getTypeName, isInvalid, isUndefined
asBagValue, asBoolean, asCollectionType, asCollectionValue, asInteger, asIntegerValue, asNavigableObject, asObject, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asTupleValue, asType, asUniqueCollectionValue, asUnlimitedNaturalValue, asValue, 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, getTypeName, initAllStatics, integerValueOf, integerValueOf, integerValueOf, integerValueOf, integerValueOf, isBoxed, isCollectionValue, isIntegerValue, isUnboxed, isUnlimited, oclToString, realValueOf, realValueOf, realValueOf, realValueOf, realValueOf, stringValueOf, throwInvalidValueException, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asCollection, asEcoreObject, count, excludes, excludesAll, flatten, getElements, getTypeId, includes, includesAll, intersection, intSize, isEmpty, iterable, iterator, notEmpty, product, size, union
asCollectionValue, asDouble, asElement, asInteger, asIntegerValue, asNavigableObject, asObject, asObjectValue, asOrderedSetValue, asRealValue, asSequenceValue, asTupleValue, asUnlimitedNaturalValue, isInvalid, isUndefined
public SetValueImpl(@NonNull CollectionTypeId typeId, @NonNull java.util.Collection<? extends java.lang.Object> boxedValues)
protected org.eclipse.emf.ecore.EClass eStaticClass()
eStaticClass
in class CollectionValueImpl
@NonNull public static java.util.Set<java.lang.Object> createSetOfEach(@NonNull java.lang.Object[] boxedValues)
@NonNull public BagValue asBagValue()
CollectionValueImpl
The default implementation is appropriate for non-unique collections and must be overridden to support OCL rather than Java uniqueness semantics.
asBagValue
in interface Value
asBagValue
in class CollectionValueImpl
@NonNull public UniqueCollectionValue asUniqueCollectionValue()
asUniqueCollectionValue
in interface Value
asUniqueCollectionValue
in class ValueImpl
@NonNull public SetValue asSetValue()
asSetValue
in interface Value
asSetValue
in class CollectionValueImpl
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
@NonNull public SetValue excluding(@Nullable java.lang.Object value)
excluding
in interface CollectionValue
@NonNull public BagValue excludingAll(@NonNull CollectionValue values)
excludingAll
in interface CollectionValue
@NonNull public SetValue flatten()
flatten
in interface CollectionValue
@NonNull public java.lang.String getKind()
getKind
in interface CollectionValue
@NonNull public SetValue including(@Nullable java.lang.Object value)
including
in interface CollectionValue
@NonNull public SetValue includingAll(@NonNull CollectionValue values)
includingAll
in interface CollectionValue
public boolean isOrdered()
isOrdered
in interface CollectionValue
public boolean isUnique()
isUnique
in interface CollectionValue
@NonNull public SetValue minus(@NonNull UniqueCollectionValue set)
minus
in interface UniqueCollectionValue
@NonNull public OrderedSetValue sort(@NonNull java.util.Comparator<java.lang.Object> comparator)
sort
in interface CollectionValue
@NonNull public SetValue symmetricDifference(@NonNull UniqueCollectionValue set)
symmetricDifference
in interface UniqueCollectionValue
public SequenceValue toSequenceValue()
toSequenceValue
in interface CollectionValue
public void toString(@NonNull java.lang.StringBuilder s, int lengthLimit)
toString
in interface Value
toString
in class CollectionValueImpl