org.freehep.util.io
Class ActionSet

java.lang.Object
  extended by org.freehep.util.io.ActionSet

public class ActionSet
extends Object

Class to keep registered Actions, which should be used by the TaggedIn/OutputStream. A set of recognized Actions can be added to this class. A concrete implementation of this stream should install all allowed actions.

Version:
$Id: ActionSet.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann, Charles Loomis

Field Summary
protected  Map actions
          This holds the individual actions.
protected  Action defaultAction
           
 
Constructor Summary
ActionSet()
          Creates an set for actions
 
Method Summary
 void addAction(Action action)
          Adds an action to the set
 boolean exists(int actionCode)
          Looks if an Action for code is in this set.
 Action get(int actionCode)
          Looks up the corresponding action for an action code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actions

protected Map actions
This holds the individual actions.


defaultAction

protected Action defaultAction
Constructor Detail

ActionSet

public ActionSet()
Creates an set for actions

Method Detail

addAction

public void addAction(Action action)
Adds an action to the set

Parameters:
action - to be added

get

public Action get(int actionCode)
Looks up the corresponding action for an action code.

Parameters:
actionCode - code to be looked for
Returns:
corresponding action, or Action.Unknown in case Action is not found.

exists

public boolean exists(int actionCode)
Looks if an Action for code is in this set.

Parameters:
actionCode - code to be looked for
Returns:
true if action exists for code


Copyright © 2000-2007 FreeHEP. All Rights Reserved.