public class BagValueImpl extends CollectionValueImpl implements BagValue
| Modifier and Type | Class and Description |
|---|---|
static class |
BagValueImpl.Accumulator |
EMPTY_ITERATOREMPTY_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_ONE_VALUE, UNLIMITED_VALUE, ZERO_VALUEINVALID_NAME| Constructor and Description |
|---|
BagValueImpl(CollectionTypeId typeId,
Bag<? extends 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.
|
Bag<Object> |
asUnboxedObject(IdResolver idResolver)
Return the unboxed representation of this value.
|
static Bag<Object> |
createBagOfEach(Object[] boxedValues) |
boolean |
equals(Object thatObject) |
BagValue |
excluding(Object value) |
BagValue |
excludingAll(CollectionValue values) |
BagValue |
flatten() |
Bag<? extends Object> |
getElements() |
String |
getKind() |
BagValue |
including(Object value) |
BagValue |
includingAll(CollectionValue values) |
boolean |
isOrdered() |
boolean |
isUnique() |
SequenceValue |
sort(Comparator<Object> comparator) |
SequenceValue |
toSequenceValue() |
void |
toString(StringBuilder s,
int lengthLimit) |
asCollection, asCollectionValue, asEcoreObject, asEcoreObjects, asList, asObject, asOrderedSetValue, asSequenceValue, asSetValue, 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, asMapValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asRealValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, getTypeName, isInvalid, isUndefinedasBagValue, asBoolean, asClass, asCollectionType, asCollectionValue, asInteger, asIntegerValue, asMapType, asMapValue, asNavigableObject, asNavigableObject, asObject, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asTupleValue, asType, asUniqueCollectionValue, asUnlimitedNaturalValue, asValue, bigDecimalValueOf, bigIntegerValueOf, byteValueOf, characterValueOf, computeCollectionHashCode, createBagAccumulatorValue, createBagOfEach, createBagRange, createBagValue, createCollectionAccumulatorValue, createInvalidValue, createMapEntry, createMapOfEach, createMapValue, createObjectValue, createOrderedSetAccumulatorValue, createOrderedSetOfEach, createOrderedSetRange, createOrderedSetValue, createRange, createSequenceAccumulatorValue, createSequenceOfEach, createSequenceRange, createSequenceRange, createSequenceValue, createSetAccumulatorValue, createSetOfEach, createSetRange, createSetValue, createTupleOfEach, createTupleValue, doubleValueOf, floatValueOf, getElementIdName, getExecutor, getTypeName, initAllStatics, integerValueOf, integerValueOf, integerValueOf, integerValueOf, integerValueOf, intValueOf, isBoxed, isCollectionValue, isEcore, isIntegerNumber, isIntegerValue, isRealNumber, isUnboxed, isUnlimited, longValueOf, numberValueOf, oclToString, realValueOf, realValueOf, realValueOf, realValueOf, realValueOf, shortValueOf, stringValueOf, throwBooleanInvalidValueException, throwInvalidValueException, throwUnsupportedCompareTo, toString, typedIterable, unlimitedNaturalValueOf, unlimitedNaturalValueOf, unlimitedNaturalValueOf, unlimitedNaturalValueOf, unlimitedNaturalValueOfasCollection, asEcoreObject, asEcoreObjects, count, excludes, excludesAll, flatten, getTypeId, includes, includesAll, intersection, intSize, isEmpty, iterable, iterator, notEmpty, product, size, unionasCollectionValue, asDouble, asElement, asInteger, asIntegerValue, asMapValue, asNavigableObject, asObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, isInvalid, isUndefinedforEach, spliteratorpublic BagValueImpl(CollectionTypeId typeId, Bag<? extends Object> boxedValues)
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 Bag<Object> asUnboxedObject(IdResolver idResolver)
ValueA thrown exception for an invalid OCL value.
Java-null for a null OCL value
Objects for other things, Bag/Set/OrderedSet/List for collections
asUnboxedObject in interface ValueasUnboxedObject in class ValueImplpublic BagValue excluding(Object value)
excluding in interface CollectionValuepublic BagValue excludingAll(CollectionValue values)
excludingAll in interface CollectionValuepublic BagValue flatten()
flatten in interface CollectionValuepublic Bag<? extends Object> getElements()
getElements in interface CollectionValuegetElements in class CollectionValueImplpublic String getKind()
getKind in interface CollectionValuepublic BagValue including(Object value)
including in interface CollectionValuepublic BagValue includingAll(CollectionValue values)
includingAll in interface CollectionValuepublic boolean isOrdered()
isOrdered in interface CollectionValuepublic boolean isUnique()
isUnique in interface CollectionValuepublic SequenceValue sort(Comparator<Object> comparator)
sort in interface CollectionValuepublic SequenceValue toSequenceValue()
toSequenceValue in interface CollectionValuepublic void toString(StringBuilder s, int lengthLimit)
toString in interface ValuetoString in class CollectionValueImplCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.