org.eclipse.ocl.expressions
Interface CollectionLiteralExp<C>

All Superinterfaces:
ASTNode, EObject, LiteralExp<C>, Notifier, OCLExpression<C>, TypedElement<C>, Visitable
All Known Subinterfaces:
CollectionLiteralExp, CollectionLiteralExp
All Known Implementing Classes:
CollectionLiteralExpImpl, CollectionLiteralExpImpl, CollectionLiteralExpImpl

public interface CollectionLiteralExp<C>
extends LiteralExp<C>

A representation of the model object 'Collection Literal Exp'.

The following features are supported:

See Also:
ExpressionsPackage.getCollectionLiteralExp()

Method Summary
 boolean checkBagKind(DiagnosticChain diagnostics, Map<Object,Object> context)
          kind = CollectionKind::Bag implies type.oclIsKindOf(BagType)
 boolean checkElementType(DiagnosticChain diagnostics, Map<Object,Object> context)
          type.oclAsType(CollectionType).elementType = part->iterate(p; c : Classifier = OclVoid | c.commonSuperType(p.type))
 boolean checkNoCollectionInstances(DiagnosticChain diagnostics, Map<Object,Object> context)
          kind <> CollectionKind::Collection
 boolean checkSequenceKind(DiagnosticChain diagnostics, Map<Object,Object> context)
          kind = CollectionKind::Sequence implies type.oclIsKindOf(SequenceType)
 boolean checkSetKind(DiagnosticChain diagnostics, Map<Object,Object> context)
          kind = CollectionKind::Set implies type.oclIsKindOf(SetType)
 CollectionKind getKind()
          Returns the value of the 'Kind' attribute.
 EList<CollectionLiteralPart<C>> getPart()
          Returns the value of the 'Part' containment reference list.
 boolean isSimpleRange()
          Returns the value of the 'Simple Range' attribute
 void setKind(CollectionKind value)
          Sets the value of the 'Kind' attribute
 
Methods inherited from interface org.eclipse.ocl.utilities.TypedElement
getName, getType, setName, setType
 
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.ocl.utilities.Visitable
accept
 
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.ocl.utilities.ASTNode
getEndPosition, getStartPosition, setEndPosition, setStartPosition
 
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
 

Method Detail

getKind

CollectionKind getKind()
Returns the value of the 'Kind' attribute. The literals are from the enumeration CollectionKind.

If the meaning of the 'Collection Kind' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Kind' attribute.
See Also:
CollectionKind, setKind(CollectionKind), ExpressionsPackage.getCollectionLiteralExp_Kind()

setKind

void setKind(CollectionKind value)
Sets the value of the 'Kind' attribute.

Parameters:
value - the new value of the 'Kind' attribute.
See Also:
CollectionKind, getKind()

getPart

EList<CollectionLiteralPart<C>> getPart()
Returns the value of the 'Part' containment reference list. The list contents are of type CollectionLiteralPart<C>.

If the meaning of the 'Part' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Part' containment reference list.
See Also:
ExpressionsPackage.getCollectionLiteralExp_Part()

isSimpleRange

boolean isSimpleRange()
Returns the value of the 'Simple Range' attribute.

If the meaning of the 'Simple Range' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Simple Range' attribute.
See Also:
ExpressionsPackage.getCollectionLiteralExp_SimpleRange()

checkNoCollectionInstances

boolean checkNoCollectionInstances(DiagnosticChain diagnostics,
                                   Map<Object,Object> context)
kind <> CollectionKind::Collection

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

checkSetKind

boolean checkSetKind(DiagnosticChain diagnostics,
                     Map<Object,Object> context)
kind = CollectionKind::Set implies type.oclIsKindOf(SetType)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

checkSequenceKind

boolean checkSequenceKind(DiagnosticChain diagnostics,
                          Map<Object,Object> context)
kind = CollectionKind::Sequence implies type.oclIsKindOf(SequenceType)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

checkBagKind

boolean checkBagKind(DiagnosticChain diagnostics,
                     Map<Object,Object> context)
kind = CollectionKind::Bag implies type.oclIsKindOf(BagType)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

checkElementType

boolean checkElementType(DiagnosticChain diagnostics,
                         Map<Object,Object> context)
type.oclAsType(CollectionType).elementType = part->iterate(p; c : Classifier = OclVoid | c.commonSuperType(p.type))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.