Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ScanDescriptors.java

00001 package Sct;
00002 
00003 public class ScanDescriptors {
00004     _ScanDescriptorsHelper.Descriptor [] realList;
00005     
00006     ScanDescriptors() {
00007         realList = _ScanDescriptorsHelper.getDescriptors();
00008     }
00009 
00010     public String [] listDescriptors() {
00011         String [] descs = new String[realList.length];
00012         for(int i=0; i<descs.length; i++) {
00013             descs[i] = realList[i].name;
00014         }
00015 
00016         return descs;
00017     }
00018 
00019     public int valueFor(String name) {
00020         for(int i=0; i<realList.length; i++) {
00021             if(realList[i].name.equals(name)) {
00022                 return realList[i].value;
00023             }
00024         }
00025 
00026         return -1;
00027     }
00028 
00029     public static ScanDescriptors getInstance() {
00030         if(instance == null) {
00031             instance = new ScanDescriptors();
00032         }
00033         return instance;
00034     }
00035 
00036     private static ScanDescriptors instance = null;
00037 }

Generated on Thu Jul 15 09:55:48 2004 for SCT DAQ/DCS Software - Java by doxygen 1.3.5