All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ibs.util.ValueSet

java.lang.Object
   |
   +----ibs.util.ValueSet

public class ValueSet
extends Object
implements IValueSet, Serializable
Class ValueSet is a container class that can be instantiated directly or extended by other classes to store objects and access them as needed. This class can be instantiated by supplying a name (an identifier) for the instantiated object and optionally, by specifying maximum capacity for the container.

Each ValueSet container can be used to maintain a particular set of objects. That means, if you needed to maintain multiple sets of objects, you will instantiate multiple objects of type ValueSet.

For example, one of the primary reason we designed this container was to allow EbfServer to keep track of multiple 'Keys' and multiple 'KeyValues' for each 'Key' in the HTML form submitted by the HTTP client. What we do is, ... instantiate a new ValueSet for each 'Key'.

See Also:
IValueSet

Variable Index

 o Key
 o MaxOcc
 o NextNewOcc
 o NextOcc
 o TotalOcc
 o ValueSetName

Constructor Index

 o ValueSet(String, String)
Constructor for class ValueSet.
 o ValueSet(String, String, int)
Constructor for class ValueSet.

Method Index

 o count()
Returns total number of occurrences ( records ) in current valueset.
 o getObject()
 o getObjectAt(int)
 o getReference()
 o getValueSetName()
Returns descriptive name of the ValueSet.
 o hasMoreOcc()
Returns true if valueset has more occurrences in the set.
 o list(Writer)
Prints a list of valueset objects to the given writer.
 o moveFirst()
Call to this method moves the pointer to first record (value) in the set.
 o moveLast()
Call to this method moves the pointer to last record (value) in the set.
 o moveNext()
Call to this method moves the pointer to next record in the set (For example, if pointer is at record 1, it will be moved to 2).
 o movePrev()
Call to this method moves the pointer to previous record in the set (For example, if pointer is at record 2, it will be moved to 1).
 o newObject(Object)
Insert a new object in this container.
 o newObject(Object, String)
Insert a new object (and a reference for this object) in this container.
 o removeObjectAt(int)
 o setOcc(int)
Call to this method moves the pointer to the given record in the set.
 o totalOcc()
Returns total number of occurrences ( records ) in current valueset.
 o whereAmI()
 o whoAmI()
Returns Key that owns this valueset.

Variables

 o ValueSetName
 protected String ValueSetName
 o Key
 protected String Key
 o MaxOcc
 protected static int MaxOcc
 o NextOcc
 protected int NextOcc
 o TotalOcc
 protected int TotalOcc
 o NextNewOcc
 protected int NextNewOcc

Constructors

 o ValueSet
 public ValueSet(String value_set_name,
                 String key)
Constructor for class ValueSet. This constructor takes two parameters as explained below:

Parameters:
value_set_name - A discriptive name given to this valueset. This is for identification purpose only.
key - A Key (an identifier) for this value set. Read Class description for details
 o ValueSet
 public ValueSet(String value_set_name,
                 String key,
                 int capacity)
Constructor for class ValueSet. This constructor takes three parameters as explained below:

Parameters:
value_set_name - A discriptive name given to this valueset. This is for identification purpose only.
key - A Key (an identifier) for this value set. Read Class description for details
capacity - An integer number indicating maximum capacity for this value set.

Methods

 o getValueSetName
 public String getValueSetName()
Returns descriptive name of the ValueSet.

 o whoAmI
 public String whoAmI()
Returns Key that owns this valueset.

 o newObject
 public void newObject(Object value) throws OutOfRangeException
Insert a new object in this container.

Parameters:
value - An object that needs to be stored in this container.
 o newObject
 public void newObject(Object value,
                       String reference) throws OutOfRangeException
Insert a new object (and a reference for this object) in this container.

Parameters:
value - An object that needs to be stored in this container.
reference - A reference name that may be used while identifying an object or a resource.
 o moveFirst
 public void moveFirst()
Call to this method moves the pointer to first record (value) in the set.

 o moveNext
 public void moveNext() throws OutOfRangeException
Call to this method moves the pointer to next record in the set (For example, if pointer is at record 1, it will be moved to 2). Throws OutOfRangeException when attempted to move past last record in the value set.

 o movePrev
 public void movePrev() throws OutOfRangeException
Call to this method moves the pointer to previous record in the set (For example, if pointer is at record 2, it will be moved to 1). Throws OutOfRangeException when attempted to move past first record in the value set.

 o moveLast
 public void moveLast()
Call to this method moves the pointer to last record (value) in the set.

 o setOcc
 public void setOcc(int occ)
Call to this method moves the pointer to the given record in the set.

 o hasMoreOcc
 public boolean hasMoreOcc()
Returns true if valueset has more occurrences in the set.

Returns:
A boolean value.
 o totalOcc
 public int totalOcc()
Returns total number of occurrences ( records ) in current valueset.

Returns:
An integer indicating total occurrences in the valueset.
 o count
 public int count()
Returns total number of occurrences ( records ) in current valueset.

Returns:
An integer indicating total occurrences in the valueset.
 o whereAmI
 public int whereAmI()
 o getReference
 public String getReference() throws OccNotFoundException
 o getObject
 public Object getObject() throws OccNotFoundException
 o getObjectAt
 public Object getObjectAt(int occ) throws OccNotFoundException
 o removeObjectAt
 public void removeObjectAt(int occ) throws OccNotFoundException
 o list
 public void list(Writer w)
Prints a list of valueset objects to the given writer.

Parameters:
w - A java.io.Writer object

All Packages  Class Hierarchy  This Package  Previous  Next  Index