org.eclipse.ocl.examples.domain.types
Class AbstractCollectionType

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.types.AbstractType
      extended by org.eclipse.ocl.examples.domain.types.AbstractSpecializedType
          extended by org.eclipse.ocl.examples.domain.types.AbstractCollectionType
All Implemented Interfaces:
DomainCollectionType, DomainElement, DomainNamedElement, DomainNamespace, DomainType, Nameable, OCLValue

public class AbstractCollectionType
extends AbstractSpecializedType
implements DomainCollectionType


Field Summary
protected  DomainType elementType
           
protected  IntegerValue lower
           
protected  CollectionTypeId typeId
           
protected  IntegerValue upper
           
 
Fields inherited from class org.eclipse.ocl.examples.domain.types.AbstractSpecializedType
containerType
 
Fields inherited from class org.eclipse.ocl.examples.domain.types.AbstractType
name, standardLibrary
 
Constructor Summary
AbstractCollectionType(DomainStandardLibrary standardLibrary, java.lang.String name, DomainType containerType, DomainType elementType, IntegerValue lower, IntegerValue upper)
           
 
Method Summary
 boolean conformsTo(DomainStandardLibrary standardLibrary, DomainType type)
          Return true if this type conform to thatType within standardLibrary.
 DomainType getCommonType(IdResolver idResolver, DomainType type)
          Return the most derived type com mon to this type and thatType within standardLibrary.
 DomainType getContainerType()
           
 DomainType getElementType()
           
 IntegerValue getLowerValue()
           
 java.util.List<? extends DomainOperation> getOwnedOperation()
           
 CollectionTypeId getTypeId()
          Return a unique StandardLibrary-independent identifier for this type.
 IntegerValue getUpperValue()
           
 boolean isEqualTo(DomainStandardLibrary standardLibrary, DomainType type)
          Return true if this is the same type as thatType within standardLibrary.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.types.AbstractSpecializedType
isOrdered, isUnique, lookupImplementation
 
Methods inherited from class org.eclipse.ocl.examples.domain.types.AbstractType
createInstance, createInstance, getInheritance, getLocalOperations, getLocalProperties, getLocalSuperTypes, getMetaTypeName, getName, getNormalizedType, getOwnedAttribute, getOwnedInvariant, getOwnedRule, getPackage, getStandardLibrary, getTypeParameters, isEqualToUnspecializedType, isInvalid, oclEquals, oclHashCode, specializeIn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainCollectionType
isOrdered, isUnique
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainType
createInstance, createInstance, getInheritance, getLocalOperations, getLocalProperties, getLocalSuperTypes, getMetaTypeName, getName, getNormalizedType, getOwnedAttribute, getOwnedInvariant, getPackage, getTypeParameters, isEqualToUnspecializedType, isInvalid, lookupImplementation, specializeIn
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainNamespace
getOwnedRule
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OCLValue
oclEquals, oclHashCode
 

Field Detail

elementType

@NonNull
protected final DomainType elementType

lower

@NonNull
protected final IntegerValue lower

upper

@NonNull
protected final IntegerValue upper

typeId

@NonNull
protected final CollectionTypeId typeId
Constructor Detail

AbstractCollectionType

public AbstractCollectionType(@NonNull
                              DomainStandardLibrary standardLibrary,
                              @NonNull
                              java.lang.String name,
                              @NonNull
                              DomainType containerType,
                              @NonNull
                              DomainType elementType,
                              @Nullable
                              IntegerValue lower,
                              @Nullable
                              IntegerValue upper)
Method Detail

conformsTo

public boolean conformsTo(@NonNull
                          DomainStandardLibrary standardLibrary,
                          @NonNull
                          DomainType type)
Description copied from interface: DomainType
Return true if this type conform to thatType within standardLibrary.

Specified by:
conformsTo in interface DomainType

getCommonType

@NonNull
public DomainType getCommonType(@NonNull
                                        IdResolver idResolver,
                                        @NonNull
                                        DomainType type)
Description copied from interface: DomainType
Return the most derived type com mon to this type and thatType within standardLibrary.

Specified by:
getCommonType in interface DomainType
Specified by:
getCommonType in class AbstractType

getContainerType

public DomainType getContainerType()
Specified by:
getContainerType in interface DomainCollectionType
Overrides:
getContainerType in class AbstractSpecializedType

getElementType

@NonNull
public DomainType getElementType()
Specified by:
getElementType in interface DomainCollectionType

getLowerValue

@NonNull
public IntegerValue getLowerValue()
Specified by:
getLowerValue in interface DomainCollectionType

getOwnedOperation

@NonNull
public java.util.List<? extends DomainOperation> getOwnedOperation()
Specified by:
getOwnedOperation in interface DomainType
Overrides:
getOwnedOperation in class AbstractType

getTypeId

@NonNull
public CollectionTypeId getTypeId()
Description copied from interface: DomainType
Return a unique StandardLibrary-independent identifier for this type.

Specified by:
getTypeId in interface DomainCollectionType
Specified by:
getTypeId in interface DomainType
Returns:

getUpperValue

@NonNull
public IntegerValue getUpperValue()
Specified by:
getUpperValue in interface DomainCollectionType

isEqualTo

public boolean isEqualTo(@NonNull
                         DomainStandardLibrary standardLibrary,
                         @NonNull
                         DomainType type)
Description copied from interface: DomainType
Return true if this is the same type as thatType within standardLibrary.

Specified by:
isEqualTo in interface DomainType

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object