View Javadoc

1   package org.lcsim.conditions;
2   
3   import org.lcsim.conditions.ConditionsManager.ConditionsSetNotFoundException;
4   
5   /**
6    * A base class implemented by all types of conditions.
7    * @version $Id: Conditions.java,v 1.2 2013/10/18 21:42:47 jeremy Exp $
8    * @author Tony Johnson
9    */
10  public interface Conditions {
11      ConditionsSet getSubConditions(String name) throws ConditionsSetNotFoundException;
12  
13      RawConditions getRawSubConditions(String name) throws ConditionsSetNotFoundException;
14  
15      <T> CachedConditions<T> getCachedSubConditions(Class<T> type, String name) throws ConditionsSetNotFoundException;
16  
17      /**
18       * Add a listener to be notified about changes to these conditions.
19       * @param listener The listener to add.
20       */
21      void addConditionsListener(ConditionsListener listener);
22  
23      /**
24       * Remove a change listener from these conditions.
25       * @param listener The listener to remove.
26       */
27      void removeConditionsListener(ConditionsListener listener);
28  }