stella
Class AbstractTarget.Setup

java.lang.Object
  extended by stella.AbstractTarget.Setup
All Implemented Interfaces:
Serializable
Enclosing class:
AbstractTarget

public static class AbstractTarget.Setup
extends Object
implements Serializable

A class representing DTDConstants#SETUP elements in the DOM. It consists of an instrument name and a map of constant values.

See Also:
Serialized Form

Field Summary
private  Map constants
          The lookup table of constants for this setup.
private  String instrument
          The name of the instrument this setup is for.
 
Constructor Summary
AbstractTarget.Setup(String inst, Map lookup)
          Constructs a new Setup section.
 
Method Summary
 Map getAllConstants()
          Returns all constants in this setup element as a mapping of their names to their values as Number object.
 Object getConstant(String name)
          Returns the value of the constant with the given name.
 String getInstrument()
          Returns the name of the instrument this setup is for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instrument

private String instrument
The name of the instrument this setup is for.


constants

private Map constants
The lookup table of constants for this setup.

Constructor Detail

AbstractTarget.Setup

public AbstractTarget.Setup(String inst,
                            Map lookup)
Constructs a new Setup section. The name of the instrument and the mapping of constant names to constant values must be provided at construction.

Method Detail

getInstrument

public String getInstrument()
Returns the name of the instrument this setup is for.


getConstant

public Object getConstant(String name)
Returns the value of the constant with the given name. If no constant of the given name can be found null is returned.

Returns:
An object of the type specified in the class attribute.

getAllConstants

public Map getAllConstants()
Returns all constants in this setup element as a mapping of their names to their values as Number object.