OpenMMS
V1.5.1 Std

org.rcsb.openmms.cifparse
Class DataItemList

java.lang.Object
  |
  +--org.rcsb.openmms.cifparse.DataItemList
Direct Known Subclasses:
DictionaryItemList

public class DataItemList
extends java.lang.Object

Stores and manages the list of Data Items defined in a cif dictionary.
There may be multiple null objects in the ArrayList, which are stored with a null DataItem index; e.g. when a data file loop is read that contains multiple unwanted value fields. The HashMap will only keep a pointer (Integer) to the last one stored; but since the elementAt() method will return null for all the indicies stored with null values this doesn't matter.

Version:
1.3
Author:
Douglas S. Greer

Field Summary
 java.util.ArrayList di
          The ArrayList "di" stores all the DataItems put in this DataItem List with the add() method.
 java.util.HashMap hm
          The HashMap "hm" serves as a quick lookup to find a particular DataItem by name (String value).
 
Constructor Summary
DataItemList()
           
 
Method Summary
 void add(DataItem item)
           
 void add(java.lang.String iname)
           
 void clear()
           
 DataItem elementAt(int i)
           
 DataItem findDataItem(java.lang.String iname)
           
 boolean isAlreadyDefined(java.lang.String iname)
           
 void printItems()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

di

public java.util.ArrayList di
The ArrayList "di" stores all the DataItems put in this DataItem List with the add() method.


hm

public java.util.HashMap hm
The HashMap "hm" serves as a quick lookup to find a particular DataItem by name (String value). The HashMap stores an Integer object which is the index into the ArrayList di.

Constructor Detail

DataItemList

public DataItemList()
Method Detail

add

public void add(java.lang.String iname)

add

public void add(DataItem item)

size

public int size()

elementAt

public DataItem elementAt(int i)

findDataItem

public DataItem findDataItem(java.lang.String iname)

isAlreadyDefined

public boolean isAlreadyDefined(java.lang.String iname)

clear

public void clear()

printItems

public void printItems()

OpenMMS
V1.5.1 Std

OpenMMS, Copyright 2001, All rights reserved