|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspark.data.SArray
public class SArray
This is a concrete implementation of SA that implements arrays with arbitrary content and of dynamic length.
| Constructor Summary | |
|---|---|
SArray()
|
|
| Method Summary | |
|---|---|
void |
add(boolean val)
|
void |
add(double val)
|
void |
add(long val)
|
void |
add(SA val)
|
void |
add(SO val)
|
void |
add(java.lang.String val)
|
void |
add(SV val)
Adds a new value to the end of the array |
void |
delete(int index)
Removes a value from the array. |
void |
delete(int first,
int last)
Removes a sequence of values from the array. |
SA |
extract(int first,
int last)
Functions the same as delete except that the values to be deleted are first copied out of the array and then returned as an array. |
SV |
get(int index)
The value stored at index. |
double |
getDouble(int index)
|
long |
getLong(int index)
|
SA |
getSA(int index)
|
SO |
getSO(int index)
|
java.lang.String |
getString(int index)
|
void |
insert(int index,
boolean val)
|
void |
insert(int index,
double val)
|
void |
insert(int index,
long val)
|
void |
insert(int index,
SA vals)
Inserts a bunch of values into the array. |
void |
insert(int index,
SO val)
|
void |
insert(int index,
java.lang.String val)
|
void |
insert(int index,
SV val)
Inserts a value into the array at the specified index. |
boolean |
isTrue(int index)
|
SParented |
myParent()
Returns the parent of this object, if this object is part of a tree. |
void |
newParent(SParented newParent)
changes the parent of this object. |
void |
set(int index,
boolean val)
|
void |
set(int index,
double val)
|
void |
set(int index,
long val)
|
void |
set(int index,
SA val)
|
void |
set(int index,
SO val)
|
void |
set(int index,
java.lang.String val)
|
void |
set(int index,
SV val)
Changes the value at a particular index |
int |
size()
the size of the array |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SArray()
| Method Detail |
|---|
public int size()
SA
size in interface SApublic SV get(int index)
SA
get in interface SAindex - the index of the value to be retrieved.
public void set(int index,
SV val)
SA
set in interface SAindex - the index where the value is to be savedval - the value to be savedpublic void add(SV val)
SA
add in interface SAval - the new value
public void insert(int index,
SV val)
SA
insert in interface SAindex - the location where the new value is to be inserted.val - the new value
public void insert(int index,
SA vals)
SA
insert in interface SAindex - the location in the array where thevals - the new values to be insertedpublic void delete(int index)
SA
delete in interface SAindex - the location of the value to be removed.
public void delete(int first,
int last)
SA
delete in interface SAfirst - the index of the first value to be removed.last - the index of the last value to be removed.
public SA extract(int first,
int last)
SA
extract in interface SAfirst - the index of the first value to be removed.last - the index of the last value to be removed.
public SParented myParent()
SParented
myParent in interface SParentedpublic void newParent(SParented newParent)
SParented
newParent in interface SParentednewParent - the new parent object.
public void set(int index,
long val)
set in interface SA
public void set(int index,
double val)
set in interface SA
public void set(int index,
boolean val)
set in interface SA
public void set(int index,
java.lang.String val)
set in interface SA
public void set(int index,
SA val)
set in interface SA
public void set(int index,
SO val)
set in interface SApublic void add(long val)
add in interface SApublic void add(double val)
add in interface SApublic void add(boolean val)
add in interface SApublic void add(java.lang.String val)
add in interface SApublic void add(SA val)
add in interface SApublic void add(SO val)
add in interface SA
public void insert(int index,
long val)
insert in interface SA
public void insert(int index,
double val)
insert in interface SA
public void insert(int index,
boolean val)
insert in interface SA
public void insert(int index,
java.lang.String val)
insert in interface SA
public void insert(int index,
SO val)
insert in interface SApublic long getLong(int index)
getLong in interface SApublic double getDouble(int index)
getDouble in interface SApublic boolean isTrue(int index)
isTrue in interface SApublic java.lang.String getString(int index)
getString in interface SApublic SA getSA(int index)
getSA in interface SApublic SO getSO(int index)
getSO in interface SA
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||