gov.lanl.Utility
Class InfoList

java.lang.Object
  |
  +--gov.lanl.Utility.InfoList

public class InfoList
extends java.lang.Object

Contains a list of InfoItems so that a GUI can display the items with labels, with an editing flag and has the necessary data to submit back to a server. Assumes that group numbers are 0..n, sequential; and within a sub group, that sub group numbers are 0..n, sequentail.

 

Constructor Summary
InfoList()
          Default constructor for the class, does the necessary initialization.
 
Method Summary
 void addItem(gov.lanl.Utility.InfoItem anItem)
          Update the list by replacing the item if it is already in the list, or adding it.
 gov.lanl.Utility.InfoItem getFirstInfoItem()
          Get the first info item in the list.
 gov.lanl.Utility.InfoItem getInfoItem(int groupNum, int subGroupNum)
          Return the InfoItem by groupNum and subGroupNum; null if not there.
 gov.lanl.Utility.InfoItem getInfoItemByUse(java.lang.String inUse)
          Look up an item by the itemUse value
 java.util.Vector getInfoItemByVisWith(java.lang.String inVisWith)
          Look up an item by the itemVisWith value
 java.util.Hashtable getInfoItems()
          Provide access the the infoItems hash table
 int getMaxGroupNum()
          Returns the max group num in the list.
 int getMaxSubGroupNum(int groupNum)
          Returns the max sub group num in the group.
 gov.lanl.Utility.InfoItem getNextInfoItem()
          Get the next InfoItem in the list, null if no more.
 void printRetValues()
          Print the return values on sysout..for debugging
 void setRetValuesOfItem(java.lang.String itemKeyToSet, java.lang.String[] valuesToSet)
          Set the value of the item.
 void updateItem(gov.lanl.Utility.InfoItem anItem)
          Update the list by replacing the item if it is already in the list, or adding it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfoList

public InfoList()
Default constructor for the class, does the necessary initialization.

Method Detail

getInfoItems

public java.util.Hashtable getInfoItems()
Provide access the the infoItems hash table

Returns:
the infoItems for this InfoList

updateItem

public void updateItem(gov.lanl.Utility.InfoItem anItem)
Update the list by replacing the item if it is already in the list, or adding it.

Parameters:
anItem - is the item to update

addItem

public void addItem(gov.lanl.Utility.InfoItem anItem)
Update the list by replacing the item if it is already in the list, or adding it.

Parameters:
anItem - is the item to update

setRetValuesOfItem

public void setRetValuesOfItem(java.lang.String itemKeyToSet,
                               java.lang.String[] valuesToSet)
Set the value of the item.

Parameters:
itemKeyToSet - is the unique key for the item in the list

getFirstInfoItem

public gov.lanl.Utility.InfoItem getFirstInfoItem()
Get the first info item in the list.

Returns:
the first InfoItem in the list

getNextInfoItem

public gov.lanl.Utility.InfoItem getNextInfoItem()
Get the next InfoItem in the list, null if no more.

Returns:
the next InfoItem in the list or null.

getInfoItem

public gov.lanl.Utility.InfoItem getInfoItem(int groupNum,
                                             int subGroupNum)
Return the InfoItem by groupNum and subGroupNum; null if not there.

Parameters:
groupNum - is the group number for the request

getInfoItemByUse

public gov.lanl.Utility.InfoItem getInfoItemByUse(java.lang.String inUse)
Look up an item by the itemUse value

Parameters:
inUse - is the itemUse value to lookup
Returns:
the requested InfoItem

getInfoItemByVisWith

public java.util.Vector getInfoItemByVisWith(java.lang.String inVisWith)
Look up an item by the itemVisWith value

Parameters:
inVisWith - is the itemVisWith value to lookup
Returns:
a vector with the infoitems

getMaxGroupNum

public int getMaxGroupNum()
Returns the max group num in the list.


getMaxSubGroupNum

public int getMaxSubGroupNum(int groupNum)
Returns the max sub group num in the group.


printRetValues

public void printRetValues()
Print the return values on sysout..for debugging