org.eclipse.ohf.stem.diseasemodels.standard.impl
Class SIDiseaseModelStateImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by org.eclipse.ohf.stem.diseasemodels.standard.impl.DiseaseModelStateImpl
                  extended by org.eclipse.ohf.stem.diseasemodels.standard.impl.StandardDiseaseModelStateImpl
                      extended by org.eclipse.ohf.stem.diseasemodels.standard.impl.SIDiseaseModelStateImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, SanityChecker, DiseaseModelState, SIDiseaseModelState, StandardDiseaseModelState

public class SIDiseaseModelStateImpl
extends StandardDiseaseModelStateImpl
implements SIDiseaseModelState

An implementation of the model object 'SI Disease Model State'.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
ELAST_EOBJECT_FLAG
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Method Summary
 boolean sane()
          This method is for ongoing development and testing purposes.
 
Methods inherited from class org.eclipse.ohf.stem.diseasemodels.standard.impl.StandardDiseaseModelStateImpl
eGet, eIsSet, eSet, eUnset, getAreaRatio, setAreaRatio, toString
 
Methods inherited from class org.eclipse.ohf.stem.diseasemodels.standard.impl.DiseaseModelStateImpl
basicSetLabel, eBasicRemoveFromContainerFeature, eInverseAdd, eInverseRemove, getLabel, setLabel
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ohf.stem.diseasemodels.standard.StandardDiseaseModelState
getAreaRatio, setAreaRatio
 
Methods inherited from interface org.eclipse.ohf.stem.diseasemodels.standard.DiseaseModelState
getLabel, setLabel
 
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
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Method Detail

sane

public boolean sane()
Description copied from interface: SanityChecker
This method is for ongoing development and testing purposes. It performs a "self-check" on the instance of the class. The checking consists of combination of boolean tests and assertions using the Java "assert" facillity. Assertions must be enabled using the "-ea" JVM flag for the assertions to be enabled.

This method is intended to be overridden by extending sub-classes. These classes should first call the method in the super class (i.e., super.sane()) to ensure that the super class is "ok" and then it can issue its own assertions.

 void sane() {
        boolean retValue = super.sane();
 
        // If foo references bar, then bar should reference foo!
        retValue = retValue && (foo.a == bar && bar.a == foo);
        assert(retValue);
 
        return retValue;
 } // sane
 

The idiom retValue = retValue && <boolean test> followed by an assertion of the value of retValue is a typical pattern. If followed, then once a problem is detected, an assertion will be thrown, or the rest of the tests will be skipped and the value of false returned. By having sane return a value rather than simply relying upon the assert keyword sanity testing can occur even if assertions are not enabled.

The sane method should be called when the instance is known to be "stable" so the consistency checks should complete with no problems (if all is well).

Specified by:
sane in interface SanityChecker
Overrides:
sane in class StandardDiseaseModelStateImpl
Returns:
true if the class passes its self-test, false otherwise
See Also:
StandardDiseaseModelStateImpl.sane()