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
-
Key
-
-
MaxOcc
-
-
NextNewOcc
-
-
NextOcc
-
-
TotalOcc
-
-
ValueSetName
-
-
ValueSet(String, String)
- Constructor for class ValueSet.
-
ValueSet(String, String, int)
- Constructor for class ValueSet.
-
count()
- Returns total number of occurrences ( records ) in current valueset.
-
getObject()
-
-
getObjectAt(int)
-
-
getReference()
-
-
getValueSetName()
- Returns descriptive name of the ValueSet.
-
hasMoreOcc()
-
Returns true if valueset has more occurrences in the set.
-
list(Writer)
- Prints a list of valueset objects to the given writer.
-
moveFirst()
- Call to this method moves the pointer to first record (value) in the set.
-
moveLast()
- Call to this method moves the pointer to last record (value) in the set.
-
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).
-
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).
-
newObject(Object)
- Insert a new object in this container.
-
newObject(Object, String)
- Insert a new object (and a reference for this object) in this container.
-
removeObjectAt(int)
-
-
setOcc(int)
- Call to this method moves the pointer to the given record in the set.
-
totalOcc()
- Returns total number of occurrences ( records ) in current valueset.
-
whereAmI()
-
-
whoAmI()
- Returns Key that owns this valueset.
ValueSetName
protected String ValueSetName
Key
protected String Key
MaxOcc
protected static int MaxOcc
NextOcc
protected int NextOcc
TotalOcc
protected int TotalOcc
NextNewOcc
protected int NextNewOcc
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
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.
getValueSetName
public String getValueSetName()
- Returns descriptive name of the ValueSet.
whoAmI
public String whoAmI()
- Returns Key that owns this valueset.
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.
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.
moveFirst
public void moveFirst()
- Call to this method moves the pointer to first record (value) in the set.
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.
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.
moveLast
public void moveLast()
- Call to this method moves the pointer to last record (value) in the set.
setOcc
public void setOcc(int occ)
- Call to this method moves the pointer to the given record in the set.
hasMoreOcc
public boolean hasMoreOcc()
- Returns true if valueset has more occurrences in the set.
- Returns:
- A boolean value.
totalOcc
public int totalOcc()
- Returns total number of occurrences ( records ) in current valueset.
- Returns:
- An integer indicating total occurrences in the valueset.
count
public int count()
- Returns total number of occurrences ( records ) in current valueset.
- Returns:
- An integer indicating total occurrences in the valueset.
whereAmI
public int whereAmI()
getReference
public String getReference() throws OccNotFoundException
getObject
public Object getObject() throws OccNotFoundException
getObjectAt
public Object getObjectAt(int occ) throws OccNotFoundException
removeObjectAt
public void removeObjectAt(int occ) throws OccNotFoundException
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