edu.cmu.sei.aadl.model.properties
Class ModalPropertyValueAccumulatorImpl.ModalAssociations

java.lang.Object
  extended by edu.cmu.sei.aadl.model.properties.ModalPropertyValueAccumulatorImpl.ModalAssociations
Enclosing class:
ModalPropertyValueAccumulatorImpl

protected abstract class ModalPropertyValueAccumulatorImpl.ModalAssociations
extends java.lang.Object


Constructor Summary
protected ModalPropertyValueAccumulatorImpl.ModalAssociations(java.util.List compExistsInModes)
           
 
Method Summary
 void addAssociation(PropertyAssociation pa)
          Add an association for all modes.
 void addAssociationInModes(PropertyAssociation pa, java.util.List modes)
          Add an association for the given modes.
protected abstract  java.util.List fixPropertyInModes(java.util.List modes)
           
 ModalPropertyValueAccumulatorImpl.PAWrapper getAssociation(Mode mode)
          Get the association that holds for a particular mode.
 boolean isModal()
           
protected abstract  ModalPropertyValueAccumulatorImpl.PAWrapper wrapPropertyAssociation(PropertyAssociation pa)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModalPropertyValueAccumulatorImpl.ModalAssociations

protected ModalPropertyValueAccumulatorImpl.ModalAssociations(java.util.List compExistsInModes)
Method Detail

isModal

public final boolean isModal()

addAssociation

public final void addAssociation(PropertyAssociation pa)
                          throws InvalidModelException
Add an association for all modes.

Parameters:
pa - The property association
Throws:
java.lang.NullPointerException - Thrown if pa is null.
InvalidModelException

addAssociationInModes

public final void addAssociationInModes(PropertyAssociation pa,
                                        java.util.List modes)
                                 throws InvalidModelException
Add an association for the given modes.

Parameters:
pa - The property association
modes - The list of modes; non-null and non-empty
Throws:
java.lang.NullPointerException - Thrown if pa is null.
InvalidModelException

getAssociation

public final ModalPropertyValueAccumulatorImpl.PAWrapper getAssociation(Mode mode)
                                                                 throws ModalPropertyValueAccumulatorImpl.NonExistentPropertyException
Get the association that holds for a particular mode. If there isn't an association for the mode, it will return the global association.

Parameters:
mode - The mode. If null then the global value will be returned. This is the only legal way to look up the value if the association is modeless.
Returns:
The property association for the mode or null if the association is not present.
Throws:
ModalPropertyValueAccumulatorImpl.NonExistentPropertyException

fixPropertyInModes

protected abstract java.util.List fixPropertyInModes(java.util.List modes)

wrapPropertyAssociation

protected abstract ModalPropertyValueAccumulatorImpl.PAWrapper wrapPropertyAssociation(PropertyAssociation pa)