org.lsst.ccs.utilities.sa
Class CmndProc.Lookup

java.lang.Object
  extended by org.lsst.ccs.utilities.sa.CmndProc.Lookup
Enclosing class:
CmndProc

public static class CmndProc.Lookup
extends Object

Inner class to implement lookup tables


Constructor Summary
CmndProc.Lookup(int count)
          Constructor
 
Method Summary
 void add(String name, int code)
          Adds a new entry
 int code(int index)
          Gets the code given its index
 int count()
          Gets the number of items
 String decode(int code)
          Decodes a code to its equivalent name
 int encode(String name, boolean report)
          Encodes a name to its equivalent code
 String name(int index)
          Gets the name given its index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmndProc.Lookup

public CmndProc.Lookup(int count)
Constructor

Method Detail

add

public void add(String name,
                int code)
Adds a new entry


encode

public int encode(String name,
                  boolean report)
Encodes a name to its equivalent code


decode

public String decode(int code)
Decodes a code to its equivalent name


count

public int count()
Gets the number of items


code

public int code(int index)
Gets the code given its index


name

public String name(int index)
Gets the name given its index



Copyright © 2012 LSST. All Rights Reserved.