org.LexGrid.LexBIG.DataModel.Collections
Class NameAndValueList

java.lang.Object
  extended by org.LexGrid.LexBIG.DataModel.Collections.NameAndValueList
All Implemented Interfaces:
java.io.Serializable

public class NameAndValueList
extends java.lang.Object
implements java.io.Serializable

Class NameAndValueList.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
NameAndValueList()
           
 
Method Summary
 void addNameAndValue(int index, NameAndValue vNameAndValue)
           
 void addNameAndValue(NameAndValue vNameAndValue)
           
 java.util.Enumeration<? extends NameAndValue> enumerateNameAndValue()
          Method enumerateNameAndValue.
 NameAndValue[] getNameAndValue()
          Method getNameAndValue.Returns the contents of the collection in an Array.
 NameAndValue getNameAndValue(int index)
          Method getNameAndValue.
 int getNameAndValueCount()
          Method getNameAndValueCount.
 java.util.Iterator<? extends NameAndValue> iterateNameAndValue()
          Method iterateNameAndValue.
 void removeAllNameAndValue()
           
 boolean removeNameAndValue(NameAndValue vNameAndValue)
          Method removeNameAndValue.
 NameAndValue removeNameAndValueAt(int index)
          Method removeNameAndValueAt.
 void setNameAndValue(int index, NameAndValue vNameAndValue)
           
 void setNameAndValue(NameAndValue[] vNameAndValueArray)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameAndValueList

public NameAndValueList()
Method Detail

addNameAndValue

public void addNameAndValue(NameAndValue vNameAndValue)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
vNameAndValue -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addNameAndValue

public void addNameAndValue(int index,
                            NameAndValue vNameAndValue)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vNameAndValue -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateNameAndValue

public java.util.Enumeration<? extends NameAndValue> enumerateNameAndValue()
Method enumerateNameAndValue.

Returns:
an Enumeration over all possible elements of this collection

getNameAndValue

public NameAndValue getNameAndValue(int index)
                             throws java.lang.IndexOutOfBoundsException
Method getNameAndValue.

Parameters:
index -
Returns:
the value of the org.LexGrid.LexBIG.DataModel.Core.NameAndValue at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getNameAndValue

public NameAndValue[] getNameAndValue()
Method getNameAndValue.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getNameAndValueCount

public int getNameAndValueCount()
Method getNameAndValueCount.

Returns:
the size of this collection

iterateNameAndValue

public java.util.Iterator<? extends NameAndValue> iterateNameAndValue()
Method iterateNameAndValue.

Returns:
an Iterator over all possible elements in this collection

removeAllNameAndValue

public void removeAllNameAndValue()

removeNameAndValue

public boolean removeNameAndValue(NameAndValue vNameAndValue)
Method removeNameAndValue.

Parameters:
vNameAndValue -
Returns:
true if the object was removed from the collection.

removeNameAndValueAt

public NameAndValue removeNameAndValueAt(int index)
Method removeNameAndValueAt.

Parameters:
index -
Returns:
the element removed from the collection

setNameAndValue

public void setNameAndValue(int index,
                            NameAndValue vNameAndValue)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vNameAndValue -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setNameAndValue

public void setNameAndValue(NameAndValue[] vNameAndValueArray)
Parameters:
vNameAndValueArray -

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.