|
JACK 5.4 JACOB Application Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for a list of objects known as an 'aggregation' in Jacob.
The default aggregation implementation is a Java array,
but this can be replaced with a user defined Aggregate
implementation.
An aggregation is ordered and allows access to items by position,
with 0 being the first position.
BaseList
Method Summary | |
Base |
addAfter(Base existing_obj,
Base obj)
Adds a Jacob Base Object to the
Aggregate one position after an Object already
present in the Aggregate . |
Base |
addAt(Base obj,
int index)
Adds a Jacob Base Object to the
Aggregate at the given index position. |
Base |
addBefore(Base existing_obj,
Base obj)
Adds a Jacob Base Object to the
Aggregate one position before an Object already
present in the Aggregate . |
Base |
addFirst(Base obj)
Adds a Jacob Base Object to the start of the
Aggregate . |
Base |
addLast(Base obj)
Adds a Jacob Base Object to the end of the
Aggregate . |
Base |
elementAt(int index)
Returns the Jacob Base element at the given index
of the Aggregate . |
java.util.Enumeration |
elements()
Returns the Aggregate as an Enumeration of elements of type
AggregateEnumeration . |
void |
empty()
Permanently removes all elements currently stored in the Aggregate . |
int |
getSize()
Returns the number of elements currently stored in the Aggregate . |
Base |
replace(Base old_obj,
Base new_obj)
Replaces a Jacob Base Object currently stored in
the Aggregate with a new one. |
Base |
rm(Base obj)
Removes a given Jacob Base Object from the
Aggregate . |
Base |
rmAt(int index)
Removes a Jacob Base Object from the
Aggregate at a given index position. |
Method Detail |
public int getSize()
Aggregate
.
Aggregate
.public Base elementAt(int index)
Base
element at the given index
of the Aggregate
.
If the index is less than zero, or greater than the index of the last
element in the Aggregate
,
this method returns null.
index
- the index of the Jacob Base
Object
to be retrieved.
Base
Object at the given index
of the Aggregate
; otherwise null.public Base addFirst(Base obj)
Base
Object to the start of the
Aggregate
.
Base
Object that was added to the
start of the Aggregate
.public Base addLast(Base obj)
Base
Object to the end of the
Aggregate
.
Base
Object that was added to the
end of the Aggregate
.public Base addAt(Base obj, int index)
Base
Object to the
Aggregate
at the given index position.
Any Base
Objects in the Aggregate
located at or after the given index
will be shifted to make way for the new Object.
If the given index is less than zero, this method will return null.
However, if the index given is greater than the index of the last element
in the Aggregate
, the new Object will simply be added to the
end of the Aggregate
. Under normal circumstances, this
method returns the Object added to the Aggregate
.
index
- the index at which the Jacob Base
Object should be added.
Base
Object that was added to
the Aggregate
; otherwise null.public Base rmAt(int index)
Base
Object from the
Aggregate
at a given index position.
Any Base
Objects in the Aggregate
located after the given index will be shifted to fill the space left
by the removed Object. If the given index is less than zero, or
greater than the index of the last element in the Aggregate
,
this method will return null. Otherwise, the removed Object is returned.
index
- the index of the Jacob Base
Object
to be removed from the Aggregate
.
Base
Object that was removed
from the Aggregate
; otherwise null.public Base replace(Base old_obj, Base new_obj)
Base
Object currently stored in
the Aggregate
with a new one.
If the Object to replace does not exist in the Aggregate
,
this method will return null. Otherwise, the Object that was added is
returned.
Base
Object that was added to
the Aggregate
; otherwise null.public Base rm(Base obj)
Base
Object from the
Aggregate
.
Any Base
Objects in the Aggregate
located after the given Object will be shifted to fill the space left
by its removal.
If the given Object does not exist in the Aggregate
,
this method will return null. Otherwise, the removed Object is returned.
Base
Object that was removed from
the Aggregate
; otherwise null.public Base addBefore(Base existing_obj, Base obj)
Base
Object to the
Aggregate
one position before an Object already
present in the Aggregate
. Any Base
Objects in the Aggregate
located before the
Object in the second parameter will be shifted to make way for the new
Object.
If the object in the second parameter cannot be found, this method will return null. Otherwise, the added Object is returned.
Base
Object that was added to the
Aggregate
; otherwise null.public Base addAfter(Base existing_obj, Base obj)
Base
Object to the
Aggregate
one position after an Object already
present in the Aggregate
. Any Base
Objects in the Aggregate
located after the
Object in the second parameter will be shifted to make way for the
new Object.
If the object in the second parameter cannot be found, this method will return null. Otherwise, the added Object is returned.
Base
Object that was added to
the Aggregate
; otherwise null.public void empty()
Aggregate
.
public java.util.Enumeration elements()
Aggregate
as an Enumeration of elements of type
AggregateEnumeration
.
Aggregate
as an Enumeration of elements of type
AggregateEnumeration
.
|
JACK 5.4 JACOB Application Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.