## org.eclipse.uml2.uml
Interface Generalization

All Superinterfaces:
  DirectedRelationship, Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier, Relationship

    public interface Generalization

extends DirectedRelationship

A representation of the model object 'Generalization'. A generalization is a taxonomic relationship between a more general classifier and a more specific classifier. Each instance of the specific classifier is also an indirect instance of the general classifier. Thus, the specific classifier inherits the features of the more general classifier. A generalization relates a specific classifier to a more general classifier, and is owned by the specific classifier.

The following features are supported:

- `Is Substitutable`
- `General`
- `Generalization Set`
- `Specific`

See Also:
  `UMLPackage.getGeneralization()`

Method Summary
`Classifier` `getGeneral()` Returns the value of the 'General' reference.
`GeneralizationSet` `getGeneralizationSet(java.lang.String name)` Retrieves the first `GeneralizationSet` with the specified 'Name' from the 'Generalization Set' reference list
`GeneralizationSet` `getGeneralizationSet(java.lang.String name, boolean ignoreCase)` Retrieves the first `GeneralizationSet` with the specified 'Name' from the 'Generalization Set' reference list
`org.eclipse.emf.common.util.EList<GeneralizationSet>` `getGeneralizationSets()` Returns the value of the 'Generalization Set' reference list.
`Classifier` `getSpecific()` Returns the value of the 'Specific' container reference.
`boolean` `isSubstitutable()` Returns the value of the 'Is Substitutable' attribute.
`void` `setGeneral(Classifier value)` Sets the value of the '`General`' reference
`void` `setIsSubstitutable(boolean value)` Sets the value of the '`Is Substitutable`' attribute
`void` `setSpecific(Classifier value)` Sets the value of the '`Specific`' container reference
`boolean` `validateGeneralizationSameClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` Every Generalization associated with a given GeneralizationSet must have the same general Classifier.

Methods inherited from interface org.eclipse.uml2.uml.DirectedRelationship
`getSources, getTargets`

Methods inherited from interface org.eclipse.uml2.uml.Relationship
`getRelatedElements`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

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`

Method Detail

### isSubstitutable

    boolean isSubstitutable()

  Returns the value of the 'Is Substitutable' attribute. The default value is `"true"`. Indicates whether the specific classifier can be used wherever the general classifier can be used. If true, the execution traces of the specific classifier will be a superset of the execution traces of the general classifier.

  Returns:
    the value of the 'Is Substitutable' attribute.
  See Also:
    `setIsSubstitutable(boolean)`, `UMLPackage.getGeneralization_IsSubstitutable()`

### setIsSubstitutable

    void setIsSubstitutable(boolean value)

  Sets the value of the '`Is Substitutable`' attribute.

  Parameters:
    `value` - the new value of the 'Is Substitutable' attribute.
  See Also:
    `isSubstitutable()`

### getGeneral

    Classifier getGeneral()

  Returns the value of the 'General' reference.

  This feature subsets the following features:

  - '`Target`'
  References the general classifier in the Generalization relationship.

  Returns:
    the value of the 'General' reference.
  See Also:
    `setGeneral(Classifier)`, `UMLPackage.getGeneralization_General()`

### setGeneral

    void setGeneral(Classifier value)

  Sets the value of the '`General`' reference.

  Parameters:
    `value` - the new value of the 'General' reference.
  See Also:
    `getGeneral()`

### getGeneralizationSets

    org.eclipse.emf.common.util.EList<GeneralizationSet> getGeneralizationSets()

  Returns the value of the 'Generalization Set' reference list. The list contents are of type `GeneralizationSet`. It is bidirectional and its opposite is '`Generalization`'. Designates a set in which instances of Generalization is considered members.

  Returns:
    the value of the 'Generalization Set' reference list.
  See Also:
    `UMLPackage.getGeneralization_GeneralizationSet()`, `GeneralizationSet.getGeneralizations()`

### getGeneralizationSet

    GeneralizationSet getGeneralizationSet(java.lang.String name)

  Retrieves the first `GeneralizationSet` with the specified 'Name' from the 'Generalization Set' reference list.

  Parameters:
    `name` - The 'Name' of the `GeneralizationSet` to retrieve, or `null`.
  Returns:
    The first `GeneralizationSet` with the specified 'Name', or `null`.
  See Also:
    `getGeneralizationSets()`

### getGeneralizationSet

    GeneralizationSet getGeneralizationSet(java.lang.String name,
                                           boolean ignoreCase)

  Retrieves the first `GeneralizationSet` with the specified 'Name' from the 'Generalization Set' reference list.

  Parameters:
    `name` - The 'Name' of the `GeneralizationSet` to retrieve, or `null`.
    `ignoreCase` - Whether to ignore case in `String` comparisons.
  Returns:
    The first `GeneralizationSet` with the specified 'Name', or `null`.
  See Also:
    `getGeneralizationSets()`

### getSpecific

    Classifier getSpecific()

  Returns the value of the 'Specific' container reference. It is bidirectional and its opposite is '`Generalization`'.

  This feature subsets the following features:

  - '`Source`'
  - '`Owner`'
  References the specializing classifier in the Generalization relationship.

  Returns:
    the value of the 'Specific' container reference.
  See Also:
    `setSpecific(Classifier)`, `UMLPackage.getGeneralization_Specific()`, `Classifier.getGeneralizations()`

### setSpecific

    void setSpecific(Classifier value)

  Sets the value of the '`Specific`' container reference.

  Parameters:
    `value` - the new value of the 'Specific' container reference.
  See Also:
    `getSpecific()`

### validateGeneralizationSameClassifier

    boolean validateGeneralizationSameClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                 java.util.Map<java.lang.Object,java.lang.Object> context)

  Every Generalization associated with a given GeneralizationSet must have the same general Classifier. That is, all Generalizations for a particular GeneralizationSet must have the same superclass. true

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

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