|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jess.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 |
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 creationMethod Detail |
public final int size()
public java.lang.Object clone()
clone
in class java.lang.Object
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 fetchpublic 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.public final ValueVector add(Value val)
val
- The value to add.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- Another objectpublic static void copy(ValueVector src, int srcPos, ValueVector dest, int destPos, int length)
public ValueVector addAll(ValueVector vv)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringWithParens()
|
© 1997 E.J. Friedman-Hill and Sandia Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |