org.eclipse.uml2.uml
Interface ReduceAction

All Superinterfaces:
Action, ActivityContent, ActivityNode, Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, ExecutableNode, NamedElement, org.eclipse.emf.common.notify.Notifier, RedefinableElement

public interface ReduceAction
extends Action

A representation of the model object 'Reduce Action'. A ReduceAction is an Action that reduces a collection to a single value by repeatedly combining the elements of the collection using a reducer Behavior.

From package UML::Actions.

The following features are supported:

See Also:
UMLPackage.getReduceAction()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 InputPin createCollection(java.lang.String name, Type type)
          Creates a new InputPin,with the specified 'Name', and 'Type', and sets the 'Collection' containment reference
 InputPin createCollection(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new InputPin, with the specified 'Name', and 'Type', and sets the 'Collection' containment reference
 OutputPin createResult(java.lang.String name, Type type)
          Creates a new OutputPin,with the specified 'Name', and 'Type', and sets the 'Result' containment reference
 InputPin getCollection()
          Returns the value of the 'Collection' containment reference.
 Behavior getReducer()
          Returns the value of the 'Reducer' reference
 OutputPin getResult()
          Returns the value of the 'Result' containment reference.
 boolean isOrdered()
          Returns the value of the 'Is Ordered' attribute.
 void setCollection(InputPin value)
          Sets the value of the 'Collection' containment reference
 void setIsOrdered(boolean value)
          Sets the value of the 'Is Ordered' attribute
 void setReducer(Behavior value)
          Sets the value of the 'Reducer' reference
 void setResult(OutputPin value)
          Sets the value of the 'Result' containment reference
 boolean validateInputTypeIsCollection(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The type of the collection InputPin must be a collection.
 boolean validateOutputTypesAreCompatible(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The type of the output of the reducer Behavior must conform to the type of the result OutputPin.
 boolean validateReducerInputsOutput(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The reducer Behavior must have two input ownedParameters and one output ownedParameter, where the type of the output Parameter and the type of elements of the input collection conform to the types of the input Parameters.
 
Methods inherited from interface org.eclipse.uml2.uml.Action
allActions, allOwnedNodes, containingBehavior, createLocalPostcondition, createLocalPostcondition, createLocalPrecondition, createLocalPrecondition, getContext, getInput, getInput, getInputs, getLocalPostcondition, getLocalPostcondition, getLocalPostconditions, getLocalPrecondition, getLocalPrecondition, getLocalPreconditions, getOutput, getOutput, getOutputs, isLocallyReentrant, setIsLocallyReentrant
 
Methods inherited from interface org.eclipse.uml2.uml.ExecutableNode
createHandler, getHandlers
 
Methods inherited from interface org.eclipse.uml2.uml.ActivityNode
getActivity, getIncoming, getIncoming, getIncomings, getInGroup, getInGroup, getInGroups, getInInterruptibleRegion, getInInterruptibleRegion, getInInterruptibleRegions, getInPartition, getInPartition, getInPartitions, getInStructuredNode, getOutgoing, getOutgoing, getOutgoings, getRedefinedNode, getRedefinedNode, getRedefinedNodes, setActivity, setInStructuredNode
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateNonLeafRedefinition, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
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, eInvoke, 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.uml2.uml.ActivityContent
containingActivity
 

Method Detail

getReducer

Behavior getReducer()
Returns the value of the 'Reducer' reference. A Behavior that is repreatedly applied to two elements of the input collection to produce a value that is of the same type as elements of the collection.

From package UML::Actions.

Returns:
the value of the 'Reducer' reference.
See Also:
setReducer(Behavior), UMLPackage.getReduceAction_Reducer()

setReducer

void setReducer(Behavior value)
Sets the value of the 'Reducer' reference.

Parameters:
value - the new value of the 'Reducer' reference.
See Also:
getReducer()

getResult

OutputPin getResult()
Returns the value of the 'Result' containment reference.

This feature subsets the following features:

The output pin on which the result value is placed.

From package UML::Actions.

Returns:
the value of the 'Result' containment reference.
See Also:
setResult(OutputPin), UMLPackage.getReduceAction_Result()

setResult

void setResult(OutputPin value)
Sets the value of the 'Result' containment reference.

Parameters:
value - the new value of the 'Result' containment reference.
See Also:
getResult()

createResult

OutputPin createResult(java.lang.String name,
                       Type type)
Creates a new OutputPin,with the specified 'Name', and 'Type', and sets the 'Result' containment reference.

Parameters:
name - The 'Name' for the new OutputPin, or null.
type - The 'Type' for the new OutputPin, or null.
Returns:
The new OutputPin.
See Also:
getResult()

getCollection

InputPin getCollection()
Returns the value of the 'Collection' containment reference.

This feature subsets the following features:

The InputPin that provides the collection to be reduced.

From package UML::Actions.

Returns:
the value of the 'Collection' containment reference.
See Also:
setCollection(InputPin), UMLPackage.getReduceAction_Collection()

setCollection

void setCollection(InputPin value)
Sets the value of the 'Collection' containment reference.

Parameters:
value - the new value of the 'Collection' containment reference.
See Also:
getCollection()

createCollection

InputPin createCollection(java.lang.String name,
                          Type type,
                          org.eclipse.emf.ecore.EClass eClass)
Creates a new InputPin, with the specified 'Name', and 'Type', and sets the 'Collection' containment reference.

Parameters:
name - The 'Name' for the new InputPin, or null.
type - The 'Type' for the new InputPin, or null.
eClass - The Ecore class of the InputPin to create.
Returns:
The new InputPin.
See Also:
getCollection()

createCollection

InputPin createCollection(java.lang.String name,
                          Type type)
Creates a new InputPin,with the specified 'Name', and 'Type', and sets the 'Collection' containment reference.

Parameters:
name - The 'Name' for the new InputPin, or null.
type - The 'Type' for the new InputPin, or null.
Returns:
The new InputPin.
See Also:
getCollection()

isOrdered

boolean isOrdered()
Returns the value of the 'Is Ordered' attribute. The default value is "false". Indicates whether the order of the input collection should determine the order in which the reducer Behavior is applied to its elements.

From package UML::Actions.

Returns:
the value of the 'Is Ordered' attribute.
See Also:
setIsOrdered(boolean), UMLPackage.getReduceAction_IsOrdered()

setIsOrdered

void setIsOrdered(boolean value)
Sets the value of the 'Is Ordered' attribute.

Parameters:
value - the new value of the 'Is Ordered' attribute.
See Also:
isOrdered()

validateInputTypeIsCollection

boolean validateInputTypeIsCollection(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                      java.util.Map<java.lang.Object,java.lang.Object> context)
The type of the collection InputPin must be a collection.

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

validateOutputTypesAreCompatible

boolean validateOutputTypesAreCompatible(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                         java.util.Map<java.lang.Object,java.lang.Object> context)
The type of the output of the reducer Behavior must conform to the type of the result OutputPin. reducer.outputParameters().type->forAll(conformsTo(result.type))

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

validateReducerInputsOutput

boolean validateReducerInputsOutput(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                    java.util.Map<java.lang.Object,java.lang.Object> context)
The reducer Behavior must have two input ownedParameters and one output ownedParameter, where the type of the output Parameter and the type of elements of the input collection conform to the types of the input Parameters. let inputs: OrderedSet(Parameter) = reducer.inputParameters() in let outputs: OrderedSet(Parameter) = reducer.outputParameters() in inputs->size()=2 and outputs->size()=1 and inputs.type->forAll(t | outputs.type->forAll(conformsTo(t)) and -- Note that the following only checks the case when the collection is via multiple tokens. collection.upperBound()>1 implies collection.type.conformsTo(t))

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

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.