de.uka.ipd.sdq.probfunction.util
Class ProbfunctionSwitch<T1>

java.lang.Object
  extended by de.uka.ipd.sdq.probfunction.util.ProbfunctionSwitch<T1>
Direct Known Subclasses:
PCMProbfunctionEvaluationVisitor, ProbFunctionCSVPrint, ProbFunctionPrettyPrint

public class ProbfunctionSwitch<T1>
extends Object

The Switch for the model's inheritance hierarchy. It supports the call doSwitch(object) to invoke the caseXXX method for each class of the model, starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is returned, which is the result of the switch.

See Also:
ProbfunctionPackage

Field Summary
static String copyright
           
protected static ProbfunctionPackage modelPackage
          The cached model package
 
Constructor Summary
ProbfunctionSwitch()
          Creates an instance of the switch.
 
Method Summary
 T1 caseBoxedPDF(BoxedPDF object)
          Returns the result of interpreting the object as an instance of 'Boxed PDF'.
 T1 caseComplex(Complex object)
          Returns the result of interpreting the object as an instance of 'Complex'.
 T1 caseContinuousPDF(ContinuousPDF object)
          Returns the result of interpreting the object as an instance of 'Continuous PDF'.
 T1 caseContinuousSample(ContinuousSample object)
          Returns the result of interpreting the object as an instance of 'Continuous Sample'.
 T1 caseExponentialDistribution(ExponentialDistribution object)
          Returns the result of interpreting the object as an instance of 'Exponential Distribution'.
 T1 caseNormalDistribution(NormalDistribution object)
          Returns the result of interpreting the object as an instance of 'Normal Distribution'.
 T1 caseProbabilityDensityFunction(ProbabilityDensityFunction object)
          Returns the result of interpreting the object as an instance of 'Probability Density Function'.
 T1 caseProbabilityFunction(ProbabilityFunction object)
          Returns the result of interpreting the object as an instance of 'Probability Function'.
 T1 caseProbabilityMassFunction(ProbabilityMassFunction object)
          Returns the result of interpreting the object as an instance of 'Probability Mass Function'.
<T> T1
caseSample(Sample<T> object)
          Returns the result of interpreting the object as an instance of 'Sample'.
 T1 caseSamplePDF(SamplePDF object)
          Returns the result of interpreting the object as an instance of 'Sample PDF'.
 T1 caseUnitCarryingElement(UnitCarryingElement object)
          Returns the result of interpreting the object as an instance of 'Unit Carrying Element'.
 T1 defaultCase(EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'.
protected  T1 doSwitch(EClass theEClass, EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
 T1 doSwitch(EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
protected  T1 doSwitch(int classifierID, EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright

See Also:
Constant Field Values

modelPackage

protected static ProbfunctionPackage modelPackage
The cached model package

Constructor Detail

ProbfunctionSwitch

public ProbfunctionSwitch()
Creates an instance of the switch.

Method Detail

doSwitch

public T1 doSwitch(EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

doSwitch

protected T1 doSwitch(EClass theEClass,
                      EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

doSwitch

protected T1 doSwitch(int classifierID,
                      EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

caseBoxedPDF

public T1 caseBoxedPDF(BoxedPDF object)
Returns the result of interpreting the object as an instance of 'Boxed PDF'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Boxed PDF'.
See Also:
doSwitch(EObject)

caseProbabilityDensityFunction

public T1 caseProbabilityDensityFunction(ProbabilityDensityFunction object)
Returns the result of interpreting the object as an instance of 'Probability Density Function'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Probability Density Function'.
See Also:
doSwitch(EObject)

caseProbabilityFunction

public T1 caseProbabilityFunction(ProbabilityFunction object)
Returns the result of interpreting the object as an instance of 'Probability Function'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Probability Function'.
See Also:
doSwitch(EObject)

caseContinuousSample

public T1 caseContinuousSample(ContinuousSample object)
Returns the result of interpreting the object as an instance of 'Continuous Sample'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Continuous Sample'.
See Also:
doSwitch(EObject)

caseProbabilityMassFunction

public T1 caseProbabilityMassFunction(ProbabilityMassFunction object)
Returns the result of interpreting the object as an instance of 'Probability Mass Function'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Probability Mass Function'.
See Also:
doSwitch(EObject)

caseSample

public <T> T1 caseSample(Sample<T> object)
Returns the result of interpreting the object as an instance of 'Sample'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Sample'.
See Also:
doSwitch(EObject)

caseSamplePDF

public T1 caseSamplePDF(SamplePDF object)
Returns the result of interpreting the object as an instance of 'Sample PDF'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Sample PDF'.
See Also:
doSwitch(EObject)

caseComplex

public T1 caseComplex(Complex object)
Returns the result of interpreting the object as an instance of 'Complex'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Complex'.
See Also:
doSwitch(EObject)

caseContinuousPDF

public T1 caseContinuousPDF(ContinuousPDF object)
Returns the result of interpreting the object as an instance of 'Continuous PDF'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Continuous PDF'.
See Also:
doSwitch(EObject)

caseExponentialDistribution

public T1 caseExponentialDistribution(ExponentialDistribution object)
Returns the result of interpreting the object as an instance of 'Exponential Distribution'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Exponential Distribution'.
See Also:
doSwitch(EObject)

caseNormalDistribution

public T1 caseNormalDistribution(NormalDistribution object)
Returns the result of interpreting the object as an instance of 'Normal Distribution'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Normal Distribution'.
See Also:
doSwitch(EObject)

caseUnitCarryingElement

public T1 caseUnitCarryingElement(UnitCarryingElement object)
Returns the result of interpreting the object as an instance of 'Unit Carrying Element'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Unit Carrying Element'.
See Also:
doSwitch(EObject)

defaultCase

public T1 defaultCase(EObject object)
Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
#doSwitch(org.eclipse.emf.ecore.EObject)