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 java.lang.Object

Inner class to implement lookup tables


Constructor Summary
CmndProc.Lookup(int count)
          Constructor
 
Method Summary
 void add(java.lang.String name, int code)
          Add a new entry
 int code(int index)
          Get the code given its index
 int count()
          Get the number of items
 java.lang.String decode(int code)
          Decode a code to its equivalent name
 int encode(java.lang.String name, boolean report)
          Encode a name to its equivalent code
 java.lang.String name(int index)
          Get 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(java.lang.String name,
                int code)
Add a new entry


encode

public int encode(java.lang.String name,
                  boolean report)
Encode a name to its equivalent code


decode

public java.lang.String decode(int code)
Decode a code to its equivalent name


count

public int count()
Get the number of items


code

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


name

public java.lang.String name(int index)
Get the name given its index



Copyright © 2012 LSST. All Rights Reserved.