com.hammurapi.party.util
Class PartySwitch<T>

java.lang.Object
  extended by com.hammurapi.party.util.PartySwitch<T>

public class PartySwitch<T>
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:
PartyPackage

Field Summary
protected static PartyPackage modelPackage
          The cached model package
 
Constructor Summary
PartySwitch()
          Creates an instance of the switch.
 
Method Summary
 T caseAddress(Address object)
          Returns the result of interpreting the object as an instance of 'Address'.
 T caseCommonObject(CommonObject object)
          Returns the result of interpreting the object as an instance of 'Common Object'.
 T caseContactInfo(ContactInfo object)
          Returns the result of interpreting the object as an instance of 'Contact Info'.
 T caseCustom(Custom object)
          Returns the result of interpreting the object as an instance of 'Custom'.
 T caseDateEffectiveObject(DateEffectiveObject object)
          Returns the result of interpreting the object as an instance of 'Date Effective Object'.
 T caseEMail(EMail object)
          Returns the result of interpreting the object as an instance of 'EMail'.
 T caseIdentity(Identity object)
          Returns the result of interpreting the object as an instance of 'Identity'.
 T caseMatrixRelationship(MatrixRelationship object)
          Returns the result of interpreting the object as an instance of 'Matrix Relationship'.
 T caseOrganization(Organization object)
          Returns the result of interpreting the object as an instance of 'Organization'.
 T caseParty(Party object)
          Returns the result of interpreting the object as an instance of 'Party'.
 T casePerson(Person object)
          Returns the result of interpreting the object as an instance of 'Person'.
 T casePhone(Phone object)
          Returns the result of interpreting the object as an instance of 'Phone'.
 T caseRole(Role object)
          Returns the result of interpreting the object as an instance of 'Role'.
 T caseTag(Tag object)
          Returns the result of interpreting the object as an instance of 'Tag'.
 T caseTagged(Tagged object)
          Returns the result of interpreting the object as an instance of 'Tagged'.
 T caseURL(URL object)
          Returns the result of interpreting the object as an instance of 'URL'.
 T caseUSAddress(USAddress object)
          Returns the result of interpreting the object as an instance of 'US Address'.
 T caseWeb(Web object)
          Returns the result of interpreting the object as an instance of 'Web'.
 T defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'.
protected  T doSwitch(org.eclipse.emf.ecore.EClass theEClass, org.eclipse.emf.ecore.EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
 T doSwitch(org.eclipse.emf.ecore.EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
protected  T doSwitch(int classifierID, org.eclipse.emf.ecore.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

modelPackage

protected static PartyPackage modelPackage
The cached model package

Constructor Detail

PartySwitch

public PartySwitch()
Creates an instance of the switch.

Method Detail

doSwitch

public T doSwitch(org.eclipse.emf.ecore.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 T doSwitch(org.eclipse.emf.ecore.EClass theEClass,
                     org.eclipse.emf.ecore.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 T doSwitch(int classifierID,
                     org.eclipse.emf.ecore.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.

caseParty

public T caseParty(Party object)
Returns the result of interpreting the object as an instance of 'Party'. 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 'Party'.
See Also:
doSwitch(EObject)

caseIdentity

public T caseIdentity(Identity object)
Returns the result of interpreting the object as an instance of 'Identity'. 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 'Identity'.
See Also:
doSwitch(EObject)

caseTagged

public T caseTagged(Tagged object)
Returns the result of interpreting the object as an instance of 'Tagged'. 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 'Tagged'.
See Also:
doSwitch(EObject)

caseDateEffectiveObject

public T caseDateEffectiveObject(DateEffectiveObject object)
Returns the result of interpreting the object as an instance of 'Date Effective Object'. 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 'Date Effective Object'.
See Also:
doSwitch(EObject)

caseContactInfo

public T caseContactInfo(ContactInfo object)
Returns the result of interpreting the object as an instance of 'Contact Info'. 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 'Contact Info'.
See Also:
doSwitch(EObject)

casePhone

public T casePhone(Phone object)
Returns the result of interpreting the object as an instance of 'Phone'. 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 'Phone'.
See Also:
doSwitch(EObject)

caseWeb

public T caseWeb(Web object)
Returns the result of interpreting the object as an instance of 'Web'. 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 'Web'.
See Also:
doSwitch(EObject)

caseEMail

public T caseEMail(EMail object)
Returns the result of interpreting the object as an instance of 'EMail'. 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 'EMail'.
See Also:
doSwitch(EObject)

caseAddress

public T caseAddress(Address object)
Returns the result of interpreting the object as an instance of 'Address'. 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 'Address'.
See Also:
doSwitch(EObject)

caseCustom

public T caseCustom(Custom object)
Returns the result of interpreting the object as an instance of 'Custom'. 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 'Custom'.
See Also:
doSwitch(EObject)

caseUSAddress

public T caseUSAddress(USAddress object)
Returns the result of interpreting the object as an instance of 'US Address'. 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 'US Address'.
See Also:
doSwitch(EObject)

caseOrganization

public T caseOrganization(Organization object)
Returns the result of interpreting the object as an instance of 'Organization'. 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 'Organization'.
See Also:
doSwitch(EObject)

casePerson

public T casePerson(Person object)
Returns the result of interpreting the object as an instance of 'Person'. 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 'Person'.
See Also:
doSwitch(EObject)

caseTag

public T caseTag(Tag object)
Returns the result of interpreting the object as an instance of 'Tag'. 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 'Tag'.
See Also:
doSwitch(EObject)

caseRole

public T caseRole(Role object)
Returns the result of interpreting the object as an instance of 'Role'. 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 'Role'.
See Also:
doSwitch(EObject)

caseURL

public T caseURL(URL object)
Returns the result of interpreting the object as an instance of 'URL'. 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 'URL'.
See Also:
doSwitch(EObject)

caseCommonObject

public T caseCommonObject(CommonObject object)
Returns the result of interpreting the object as an instance of 'Common Object'. 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 'Common Object'.
See Also:
doSwitch(EObject)

caseMatrixRelationship

public T caseMatrixRelationship(MatrixRelationship object)
Returns the result of interpreting the object as an instance of 'Matrix Relationship'. 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 'Matrix Relationship'.
See Also:
doSwitch(EObject)

defaultCase

public T defaultCase(org.eclipse.emf.ecore.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)