public class BagValueImpl extends CollectionValueImpl implements BagValue
| Modifier and Type | Class and Description |
|---|---|
static class |
BagValueImpl.Accumulator |
elements, EMPTY_ITERATOR, typeIdEMPTY_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_VALUEINVALID_NAME| Constructor and Description |
|---|
BagValueImpl(CollectionTypeId typeId,
Bag<? 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.
|
static Bag<java.lang.Object> |
createBagOfEach(java.lang.Object[] boxedValues) |
boolean |
equals(java.lang.Object obj) |
protected org.eclipse.emf.ecore.EClass |
eStaticClass() |
BagValue |
excluding(java.lang.Object value) |
BagValue |
excludingAll(CollectionValue values) |
BagValue |
flatten() |
Bag<? extends java.lang.Object> |
getElements() |
java.lang.String |
getKind() |
BagValue |
including(java.lang.Object value) |
BagValue |
includingAll(CollectionValue values) |
boolean |
isOrdered() |
boolean |
isUnique() |
SequenceValue |
sort(java.util.Comparator<java.lang.Object> comparator) |
SequenceValue |
toSequenceValue() |
void |
toString(java.lang.StringBuilder s,
int lengthLimit) |
asCollection, asCollectionValue, asEcoreObject, asList, asObject, asOrderedSetValue, asSequenceValue, asSetValue, checkElementsAreUnique, count, excludes, excludesAll, flatten, getBagTypeId, getElementTypeId, getObject, getOrderedSetTypeId, getSequenceTypeId, getSetTypeId, getTypeId, hashCode, includes, includesAll, initStatics, intersection, intSize, isEmpty, iterable, iterator, notEmpty, product, size, toString, unionasDouble, asElement, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asRealValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, getTypeName, isInvalid, isUndefinedasBagValue, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitasCollection, asEcoreObject, count, excludes, excludesAll, flatten, getTypeId, includes, includesAll, intersection, intSize, isEmpty, iterable, iterator, notEmpty, product, size, unionasCollectionValue, asDouble, asElement, asInteger, asIntegerValue, asNavigableObject, asObject, asObjectValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, isInvalid, isUndefinedpublic BagValueImpl(@NonNull
CollectionTypeId typeId,
@NonNull
Bag<? extends java.lang.Object> boxedValues)
protected org.eclipse.emf.ecore.EClass eStaticClass()
eStaticClass in class CollectionValueImpl@NonNull public static Bag<java.lang.Object> createBagOfEach(@NonNull java.lang.Object[] boxedValues)
@NonNull public BagValue asBagValue()
CollectionValueImplThe default implementation is appropriate for non-unique collections and must be overridden to support OCL rather than Java uniqueness semantics.
asBagValue in interface ValueasBagValue in class CollectionValueImplpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object@NonNull public BagValue excluding(@Nullable java.lang.Object value)
excluding in interface CollectionValue@NonNull public BagValue excludingAll(@NonNull CollectionValue values)
excludingAll in interface CollectionValue@NonNull public BagValue flatten()
flatten in interface CollectionValue@NonNull public Bag<? extends java.lang.Object> getElements()
getElements in interface CollectionValuegetElements in class CollectionValueImpl@NonNull public java.lang.String getKind()
getKind in interface CollectionValue@NonNull public BagValue including(@Nullable java.lang.Object value)
including in interface CollectionValue@NonNull public BagValue includingAll(@NonNull CollectionValue values)
includingAll in interface CollectionValuepublic boolean isOrdered()
isOrdered in interface CollectionValuepublic boolean isUnique()
isUnique in interface CollectionValue@NonNull public SequenceValue sort(@NonNull java.util.Comparator<java.lang.Object> comparator)
sort in interface CollectionValue@NonNull public SequenceValue toSequenceValue()
toSequenceValue in interface CollectionValuepublic void toString(@NonNull
java.lang.StringBuilder s,
int lengthLimit)
toString in interface ValuetoString in class CollectionValueImpl