|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjess.ValueVector
A mini version of Vector (a self-extending array) that only holds Values. Not synchronized, so you must be careful of multithreading issues.
(C) E.J Friedman-Hill and Sandia National Laboratories
| Constructor Summary | |
ValueVector()
Construct a ValueVector of the default size (10) |
|
ValueVector(int size)
Construct a ValueVector of the given size |
|
| Method Summary | |
ValueVector |
add(Value val)
Add a new element to the end of this ValueVector. |
ValueVector |
addAll(ValueVector vv)
Append all Values. |
java.lang.Object |
clone()
Create a shallow copy of this ValueVector |
ValueVector |
cloneInto(ValueVector vv)
Make the parameter into a copy of this ValueVector |
static void |
copy(ValueVector src,
int srcPos,
ValueVector dest,
int destPos,
int length)
System.arraycopy DeLuxe for ValueVectors. |
boolean |
equals(java.lang.Object o)
Comparethis valueVector to another object. |
Value |
get(int i)
Fetch the entry at position i in thie ValueVector |
ValueVector |
remove(int i)
Remove the item at index i from the ValueVector; move all the higher-numbered elements down. |
ValueVector |
set(Value val,
int i)
Set the entry at position i to val. |
ValueVector |
setLength(int i)
Set the length of this ValueVector. |
int |
size()
Fetch the size of this ValueVector |
java.lang.String |
toString()
Return a String version of this ValueVector, without parentheses. |
java.lang.String |
toStringWithParens()
Return a String version of this ValueVector, with parentheses around all ValueVectors. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ValueVector()
public ValueVector(int size)
size - The number of Values this vector can hold at creation| Method Detail |
public final int size()
public java.lang.Object clone()
public ValueVector cloneInto(ValueVector vv)
vv - A ValueVector, whose contents are erased.
public Value get(int i)
throws JessException
i - The 0-based index of the Value to fetch
JessExceptionpublic ValueVector setLength(int i)
i - The new length (>= 0)
public final ValueVector set(Value val,
int i)
throws JessException
val - The new valuei - The index at which to place it.
JessExceptionpublic final ValueVector add(Value val)
val - The value to add.
public final ValueVector remove(int i)
throws JessException
JessExceptionpublic boolean equals(java.lang.Object o)
o - Another object
public static void copy(ValueVector src,
int srcPos,
ValueVector dest,
int destPos,
int length)
public ValueVector addAll(ValueVector vv)
public java.lang.String toString()
public java.lang.String toStringWithParens()
|
© 2001 E.J. Friedman-Hill and Sandia Corporation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||