|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.emf.ecore.impl.FlatEObjectImpl
org.eclipse.emf.ecore.impl.EModelElementImpl
org.eclipse.emf.ecore.impl.ENamedElementImpl
org.eclipse.emf.ecore.impl.EClassifierImpl
org.eclipse.emf.ecore.impl.EDataTypeImpl
org.eclipse.emf.ocl.types.impl.CollectionTypeImpl
public class CollectionTypeImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
---|
BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl |
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
BasicNotifierImpl.EAdapterList<E extends Object & Adapter> |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
InternalEObject.EStore |
Field Summary | |
---|---|
static String |
copyright
|
protected EClassifier |
elementType
The cached value of the ' Element Type ' reference |
protected static int |
END_POSITION_EDEFAULT
The default value of the ' End Position ' attribute |
protected int |
endPosition
The cached value of the ' End Position ' attribute |
protected static CollectionKind |
KIND_EDEFAULT
The default value of the ' Kind ' attribute |
static BagType |
OCL_BAG
|
static CollectionType |
OCL_COLLECTION
|
static OrderedSetType |
OCL_ORDERED_SET
|
static SequenceType |
OCL_SEQUENCE
|
static SetType |
OCL_SET
|
protected static int |
START_POSITION_EDEFAULT
The default value of the ' Start Position ' attribute |
protected int |
startPosition
The cached value of the ' Start Position ' attribute |
protected static int |
TYPE_END_POSITION_EDEFAULT
The default value of the ' Type End Position ' attribute |
protected static int |
TYPE_START_POSITION_EDEFAULT
The default value of the ' Type Start Position ' attribute |
protected int |
typeEndPosition
The cached value of the ' Type End Position ' attribute |
protected int |
typeStartPosition
The cached value of the ' Type Start Position ' attribute |
Fields inherited from class org.eclipse.emf.ecore.impl.EDataTypeImpl |
---|
defaultValue, defaultValueIsSet, SERIALIZABLE_EDEFAULT, SERIALIZABLE_EFLAG |
Fields inherited from class org.eclipse.emf.ecore.impl.EClassifierImpl |
---|
DEFAULT_VALUE_EDEFAULT, eClassifierExtendedMetaData, eTypeParameters, generatedInstanceClassName, INSTANCE_CLASS_EDEFAULT, INSTANCE_CLASS_NAME_EDEFAULT, instanceClass, instanceClassName, instanceTypeName, metaObjectID |
Fields inherited from class org.eclipse.emf.ecore.impl.ENamedElementImpl |
---|
name, NAME_EDEFAULT |
Fields inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl |
---|
eAnnotations, EFROZEN, ELAST_EMODEL_ELEMENT_FLAG |
Fields inherited from class org.eclipse.emf.ecore.impl.FlatEObjectImpl |
---|
eContents, eCrossReferences, eProxyURI |
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
---|
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY |
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
---|
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET |
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
EOPPOSITE_FEATURE_BASE |
Constructor Summary | |
---|---|
protected |
CollectionTypeImpl()
|
protected |
CollectionTypeImpl(EClassifier elementType)
|
Method Summary | |
---|---|
static Collection |
append(Collection c,
Object o)
Appends the supplied object to the supplied ordered collection |
static Collection |
asBag(Collection c)
Returns the supplied collection as a Bag |
static Collection |
asOrderedSet(Collection c)
Returns the supplied collection as an OrderedSet |
static Collection |
asSequence(Collection c)
Returns the supplied collection as a Sequence |
static Collection |
asSet(Collection c)
Returns the supplied collection as a Set |
static Object |
at(Collection c,
int i)
Returns the object at the supplied position of the supplied ordered collection |
EClassifier |
basicGetElementType()
|
static CollectionKind |
commonSuperType(CollectionKind kind1,
CollectionKind kind2)
|
static int |
count(Collection c,
Object o)
|
protected static EList |
createIterators()
|
static Collection |
createNewBag()
Creates a new bag |
static Collection |
createNewBag(Collection c)
Creates a new bag with initial collection supplied |
static Collection |
createNewOrderedSet()
Creates a new java ordered set |
static Collection |
createNewOrderedSet(Collection c)
Creates a new ordered set with initial collection supplied |
static Collection |
createNewSequence()
Creates a new sequence |
static Collection |
createNewSequence(Collection c)
Creates a new sequence with initial collection supplied |
static Collection |
createNewSet()
Creates a new java set |
static Collection |
createNewSet(Collection c)
Creates a new java set with initial collection supplied |
protected static EList |
createOperations()
Initialiaze Operations defined on AnyType |
int |
eBaseStructuralFeatureID(int derivedFeatureID,
Class baseClass)
|
int |
eDerivedStructuralFeatureID(int baseFeatureID,
Class baseClass)
|
Object |
eGet(int featureID,
boolean resolve,
boolean coreType)
|
boolean |
eIsSet(int featureID)
|
static boolean |
equals(Collection c1,
Collection c2)
Computes the equivalence of two collections, accounting for the equivalence of primitive numeric values that OCL considers equal but Java does not. |
void |
eSet(int featureID,
Object newValue)
|
protected EClass |
eStaticClass()
|
void |
eUnset(int featureID)
|
static boolean |
excludes(Collection c,
Object o)
|
static boolean |
excludesAll(Collection c1,
Collection c2)
|
static Collection |
excluding(Collection c,
Object o)
Returns all but the supplied element from the supplied collection. |
static Object |
first(Collection c)
Returns the first element of the supplied ordered collection if the ordered collection is not empty, null otherwise. |
static Collection |
flatten(Collection c)
Flattens a collection by taking the union of each of its constituent collections, if they are a collection type, or just returns the supplied collection if they are not. |
EClassifier |
getCommonSupertype(EClassifier type)
|
EClassifier |
getElementType()
|
int |
getEndPosition()
|
EList |
getIterators()
|
CollectionKind |
getKind()
|
String |
getName()
|
int |
getOperationCodeFor(String oper)
Returns the operation code from an operation name. |
String |
getOperationNameFor(int opcode)
Returns the String name of an operation. |
EList |
getOperations()
Get the list of operations supported by OCL Collection Types |
static int |
getRelationship(CollectionKind kind1,
CollectionKind kind2)
|
int |
getRelationshipTo(EClassifier type)
|
EClassifier |
getResultTypeFor(EClassifier ownerType,
int opcode,
EList args)
Obtain the result type on a collection type operation. |
int |
getStartPosition()
|
int |
getTypeEndPosition()
|
int |
getTypeStartPosition()
|
static int |
hashCode(Collection c)
Computes the hash of a collection, accounting for the similar hashing of primitive numeric values that OCL considers equal but Java does not. |
static boolean |
includes(Collection c,
Object o)
|
static boolean |
includesAll(Collection c1,
Collection c2)
|
static Collection |
including(Collection c,
Object element)
Returns the supplied collection with the supplied element added |
static Integer |
indexOf(Collection c,
Object o)
Returns the index in the supplied collection of the supplied object or null if the object is not in the collection. |
static Collection |
insertAt(Collection c,
int oclIndex,
Object o)
Inserts the supplied object at the supplied position of the supplied ordered collection Note: OCL is 1-indexed! |
static Collection |
intersection(Collection c1,
Collection c2)
Returns the collection containing just those elements that are in both the supplied collections. |
static boolean |
isEmpty(Collection c)
|
static Object |
last(Collection c)
Returns the last element of the supplied collection if the collection is not empty, null otherwise. |
static Set |
minus(Set s1,
Set s2)
Returns all the elements in the first supplied set that are not in the second supplied set. |
static boolean |
notEmpty(Collection c)
|
static Collection |
prepend(Collection c,
Object o)
Prepends the supplied object to the supplied ordered collection |
static Set |
product(Collection c1,
Collection c2,
EClass resultType)
Computes the product of two collections, returning a set of tuples of the resulting type. |
void |
setElementType(EClassifier newElementType)
|
void |
setEndPosition(int newEndPosition)
|
void |
setStartPosition(int newStartPosition)
|
void |
setTypeEndPosition(int newTypeEndPosition)
|
void |
setTypeStartPosition(int newTypeStartPosition)
|
static int |
size(Set s)
|
static Collection |
subOrderedSet(Collection c,
int oclLower,
int oclUpper)
Returns the subset of the supplied ordered collection whose elements have indices between the supplied lower and upper bounds (inclusive). |
static Collection |
subSequence(Collection c,
int oclLower,
int oclUpper)
Returns the subsequence of the supplied ordered collection whose elements have indices between the supplied lower and upper bounds (inclusive). |
static Object |
sum(Collection c)
|
static Set |
symmetricDifference(Set s1,
Set s2)
Returns the set of all elements in one or the other of the supplied sets that are not in their intersection. |
String |
toString()
|
static Collection |
union(Collection c1,
Collection c2)
Returns the collection containing all elements from both supplied collections |
Methods inherited from class org.eclipse.emf.ecore.impl.EDataTypeImpl |
---|
getDefaultValue, isSerializable, setDataTypeGeneratedInstanceClass, setGeneratedInstanceClass, setInstanceClassGen, setSerializable |
Methods inherited from class org.eclipse.emf.ecore.impl.ENamedElementImpl |
---|
eContents, eCrossReferences, getNameGen |
Methods inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl |
---|
eObjectForURIFragmentSegment, eURIFragmentSegment, freeze, freeze, getEAnnotation, getEAnnotations, isFrozen, setFrozen |
Methods inherited from class org.eclipse.emf.ecore.impl.FlatEObjectImpl |
---|
eIsProxy, eProperties, eProxyURI, eSetProxyURI |
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
---|
eAdapters, eBasicAdapters, eBasicProperties, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eSetClass, eSetDeliver |
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
eNotificationRequired, eNotify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.ecore.EDataType |
---|
isSerializable, setSerializable |
Methods inherited from interface org.eclipse.emf.ecore.EClassifier |
---|
getClassifierID, getDefaultValue, getEPackage, getETypeParameters, getInstanceClass, getInstanceClassName, getInstanceTypeName, isInstance, setInstanceClass, setInstanceClassName, setInstanceTypeName |
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement |
---|
setName |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
---|
getEAnnotation, getEAnnotations |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
---|
eAdapters, eDeliver, eNotify, eSetDeliver |
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
eNotificationRequired |
Field Detail |
---|
public static final String copyright
protected static final int START_POSITION_EDEFAULT
Start Position
' attribute.
getStartPosition()
,
Constant Field Valuesprotected int startPosition
Start Position
' attribute.
getStartPosition()
protected static final int END_POSITION_EDEFAULT
End Position
' attribute.
getEndPosition()
,
Constant Field Valuesprotected int endPosition
End Position
' attribute.
getEndPosition()
protected static final int TYPE_START_POSITION_EDEFAULT
Type Start Position
' attribute.
getTypeStartPosition()
,
Constant Field Valuesprotected int typeStartPosition
Type Start Position
' attribute.
getTypeStartPosition()
protected static final int TYPE_END_POSITION_EDEFAULT
Type End Position
' attribute.
getTypeEndPosition()
,
Constant Field Valuesprotected int typeEndPosition
Type End Position
' attribute.
getTypeEndPosition()
public static SequenceType OCL_SEQUENCE
public static SetType OCL_SET
public static OrderedSetType OCL_ORDERED_SET
public static BagType OCL_BAG
public static CollectionType OCL_COLLECTION
protected EClassifier elementType
Element Type
' reference.
getElementType()
protected static final CollectionKind KIND_EDEFAULT
Kind
' attribute.
getKind()
Constructor Detail |
---|
protected CollectionTypeImpl()
protected CollectionTypeImpl(EClassifier elementType)
Method Detail |
---|
public int getOperationCodeFor(String oper)
getOperationCodeFor
in interface PredefinedType
oper
-
public String getOperationNameFor(int opcode)
getOperationNameFor
in interface PredefinedType
opcode
-
protected static EList createOperations()
protected static EList createIterators()
public EList getOperations()
CollectionType
getOperations
in interface CollectionType
getOperations
in interface PredefinedType
public EList getIterators()
public String getName()
getName
in interface ENamedElement
getName
in class ENamedElementImpl
public EClassifier getResultTypeFor(EClassifier ownerType, int opcode, EList args) throws SemanticException
getResultTypeFor
in interface PredefinedType
opcode
- args
-
SemanticException
public int getRelationshipTo(EClassifier type)
getRelationshipTo
in interface PredefinedType
public EClassifier getCommonSupertype(EClassifier type) throws SemanticException
getCommonSupertype
in interface PredefinedType
SemanticException
public static CollectionKind commonSuperType(CollectionKind kind1, CollectionKind kind2)
public static int getRelationship(CollectionKind kind1, CollectionKind kind2)
protected EClass eStaticClass()
eStaticClass
in class EDataTypeImpl
public int getStartPosition()
getStartPosition
in interface ASTNode
ASTNode.setStartPosition(int)
,
UtilitiesPackage.getASTNode_StartPosition()
public void setStartPosition(int newStartPosition)
setStartPosition
in interface ASTNode
newStartPosition
- the new value of the 'Start Position' attribute.ASTNode.getStartPosition()
public int getEndPosition()
getEndPosition
in interface ASTNode
ASTNode.setEndPosition(int)
,
UtilitiesPackage.getASTNode_EndPosition()
public void setEndPosition(int newEndPosition)
setEndPosition
in interface ASTNode
newEndPosition
- the new value of the 'End Position' attribute.ASTNode.getEndPosition()
public int getTypeStartPosition()
getTypeStartPosition
in interface TypedASTNode
TypedASTNode.setTypeStartPosition(int)
,
UtilitiesPackage.getTypedASTNode_TypeStartPosition()
public void setTypeStartPosition(int newTypeStartPosition)
setTypeStartPosition
in interface TypedASTNode
newTypeStartPosition
- the new value of the 'Type Start Position' attribute.TypedASTNode.getTypeStartPosition()
public int getTypeEndPosition()
getTypeEndPosition
in interface TypedASTNode
TypedASTNode.setTypeEndPosition(int)
,
UtilitiesPackage.getTypedASTNode_TypeEndPosition()
public void setTypeEndPosition(int newTypeEndPosition)
setTypeEndPosition
in interface TypedASTNode
newTypeEndPosition
- the new value of the 'Type End Position' attribute.TypedASTNode.getTypeEndPosition()
public EClassifier getElementType()
getElementType
in interface CollectionType
public EClassifier basicGetElementType()
public void setElementType(EClassifier newElementType)
setElementType
in interface CollectionType
newElementType
- the new value of the 'Element Type' reference.CollectionType.getElementType()
public CollectionKind getKind()
getKind
in interface CollectionType
CollectionKind
,
TypesPackage.getCollectionType_Kind()
public Object eGet(int featureID, boolean resolve, boolean coreType)
eGet
in interface InternalEObject
eGet
in class EDataTypeImpl
public void eSet(int featureID, Object newValue)
eSet
in interface InternalEObject
eSet
in class EDataTypeImpl
public void eUnset(int featureID)
eUnset
in interface InternalEObject
eUnset
in class EDataTypeImpl
public boolean eIsSet(int featureID)
eIsSet
in interface InternalEObject
eIsSet
in class EDataTypeImpl
public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass)
eBaseStructuralFeatureID
in interface InternalEObject
eBaseStructuralFeatureID
in class BasicEObjectImpl
public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass)
eDerivedStructuralFeatureID
in interface InternalEObject
eDerivedStructuralFeatureID
in class BasicEObjectImpl
public String toString()
toString
in class EDataTypeImpl
public static int size(Set s)
public static boolean includes(Collection c, Object o)
public static boolean excludes(Collection c, Object o)
public static int count(Collection c, Object o)
public static boolean includesAll(Collection c1, Collection c2)
public static boolean excludesAll(Collection c1, Collection c2)
public static boolean isEmpty(Collection c)
public static boolean notEmpty(Collection c)
public static Object sum(Collection c)
public static boolean equals(Collection c1, Collection c2)
c1
- a collectionc2
- another collection
public static int hashCode(Collection c)
c
- a collection
public static Collection intersection(Collection c1, Collection c2)
c1
- the collection.c2
- the other collection.
public static Collection union(Collection c1, Collection c2)
c1
- one collection.c2
- the other collection.
public static Collection flatten(Collection c)
c
- the collection to flatten
public static Set minus(Set s1, Set s2)
s1
- the first set.s2
- the second set.
public static Collection excluding(Collection c, Object o)
c
- the collectiono
- the element
public static Set symmetricDifference(Set s1, Set s2)
s1
- one sets2
- the other set
public static Collection including(Collection c, Object element)
c
- the collectionelement
- the element
public static Collection asSet(Collection c)
c
- the collection
public static Collection asBag(Collection c)
c
- the collection
public static Collection asSequence(Collection c)
c
- the collection
public static Collection asOrderedSet(Collection c)
c
- the collection
public static Set product(Collection c1, Collection c2, EClass resultType)
c1
- a collectionc2
- another collectionresultType
- the resulting tuple type
public static Collection append(Collection c, Object o)
c
- the collectiono
- the object
public static Collection prepend(Collection c, Object o)
c
- the collectiono
- the object
public static Collection insertAt(Collection c, int oclIndex, Object o)
Note: OCL is 1-indexed!
c
- the collection.oclIndex
- the position to insert at.o
- the object to insert.
public static Collection subOrderedSet(Collection c, int oclLower, int oclUpper)
c
- the collectionoclLower
- the lower bound.oclUpper
- the upper bound.
public static Collection subSequence(Collection c, int oclLower, int oclUpper)
c
- the collectionoclLower
- the lower bound.oclUpper
- the upper bound.
public static Object at(Collection c, int i)
c
- the collectioni
- the position.
public static Object first(Collection c)
c
- the collection
public static Object last(Collection c)
c
- the collection
public static Integer indexOf(Collection c, Object o)
c
- the collection.o
- the object.
public static Collection createNewSet()
public static Collection createNewSet(Collection c)
public static Collection createNewBag()
public static Collection createNewBag(Collection c)
public static Collection createNewOrderedSet()
public static Collection createNewOrderedSet(Collection c)
public static Collection createNewSequence()
public static Collection createNewSequence(Collection c)
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |