|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.isi.stella.Stella_Object edu.isi.stella.StandardObject edu.isi.stella.AbstractCollection edu.isi.stella.Collection edu.isi.stella.Sequence edu.isi.stella.Vector
public class Vector
Field Summary | |
---|---|
int |
arraySize
|
Stella_Object[] |
theArray
|
Constructor Summary | |
---|---|
Vector()
|
Method Summary | |
---|---|
static Stella_Object |
accessVectorSlotValue(Vector self,
Symbol slotname,
Stella_Object value,
boolean setvalueP)
|
AbstractIterator |
allocateIterator()
|
Iterator |
butLast()
Generate all but the last element of the vector self . |
void |
clear()
|
Cons |
consify()
Return a list of elements in self . |
Vector |
copy()
Return a copy of the vector self . |
boolean |
emptyP()
Return true if self has length 0. |
int |
equalHashCode()
Return an equalP hash code for self . |
Stella_Object |
fifth()
|
Stella_Object |
fifthSetter(Stella_Object value)
|
Stella_Object |
first()
|
Stella_Object |
firstSetter(Stella_Object value)
|
Stella_Object |
fourth()
|
Stella_Object |
fourthSetter(Stella_Object value)
|
void |
initializeVector()
|
void |
insertAt(int offset,
Stella_Object value)
|
Stella_Object |
last()
Return the last item in the vector self . |
int |
lastPosition(Stella_Object renamed_Object,
int end)
Return the position of renamed_Object within the vector
self (counting from zero); or return null if renamed_Object does not occur within
self (uses an eqlP test). |
Stella_Object |
lastSetter(Stella_Object value)
|
int |
length()
|
List |
listify()
Return a list of elements in self . |
boolean |
memberP(Stella_Object renamed_Object)
Return TRUE if value is a member of the sequence self . |
static Vector |
newVector(int arraySize)
|
boolean |
nonEmptyP()
Return true if self has length > 0. |
Stella_Object |
nth(int position)
|
Stella_Object |
nthSetter(Stella_Object value,
int position)
|
boolean |
objectEqualP(Stella_Object y)
Return TRUE iff the vectors x and y are structurally
equivalent. |
int |
position(Stella_Object renamed_Object,
int start)
Return the position of renamed_Object within the vector
self (counting from zero); or return null if renamed_Object does not occur within
self (uses an eqlP test). |
Surrogate |
primaryType()
Returns the primary type of self . |
void |
printObject(java.io.PrintStream stream)
|
void |
printVector(java.io.PrintStream stream)
|
static void |
resizeVector(Vector self,
int size)
Change the size of self to size . |
Stella_Object |
second()
|
Stella_Object |
secondSetter(Stella_Object value)
|
Stella_Object |
third()
|
Stella_Object |
thirdSetter(Stella_Object value)
|
Methods inherited from class edu.isi.stella.Sequence |
---|
orderedP, yieldConsListFromSequence |
Methods inherited from class edu.isi.stella.Collection |
---|
insert, noDuplicatesP, remove |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int arraySize
public Stella_Object[] theArray
Constructor Detail |
---|
public Vector()
Method Detail |
---|
public static Vector newVector(int arraySize)
public Iterator butLast()
self
.
public AbstractIterator allocateIterator()
allocateIterator
in class Sequence
public int equalHashCode()
equalP
hash code for self
.
equalHashCode
in class Stella_Object
public boolean objectEqualP(Stella_Object y)
x
and y
are structurally
equivalent. Uses equalP
to test equality of elements.
objectEqualP
in class Stella_Object
y
-
public void clear()
public Vector copy()
self
.
public void insertAt(int offset, Stella_Object value)
public int lastPosition(Stella_Object renamed_Object, int end)
renamed_Object
within the vector
self
(counting from zero); or return null
if renamed_Object
does not occur within
self
(uses an eqlP
test). If end
was supplied as non-null
, only
consider the portion ending at index end
, however, the returned position
will always be relative to the entire vector.
renamed_Object
- end
-
public int position(Stella_Object renamed_Object, int start)
renamed_Object
within the vector
self
(counting from zero); or return null
if renamed_Object
does not occur within
self
(uses an eqlP
test). If start
was supplied as non-null
, only
consider the portion starting at start
, however, the returned position
will always be relative to the entire vector.
renamed_Object
- start
-
public boolean memberP(Stella_Object renamed_Object)
Sequence
value
is a member of the sequence self
.
memberP
in class Sequence
public int length()
length
in class Sequence
public Stella_Object lastSetter(Stella_Object value)
public Stella_Object nthSetter(Stella_Object value, int position)
public Stella_Object fifthSetter(Stella_Object value)
public Stella_Object fourthSetter(Stella_Object value)
public Stella_Object thirdSetter(Stella_Object value)
public Stella_Object secondSetter(Stella_Object value)
public Stella_Object firstSetter(Stella_Object value)
public Stella_Object last()
self
.
public Stella_Object nth(int position)
public Stella_Object fifth()
public Stella_Object fourth()
public Stella_Object third()
public Stella_Object second()
public Stella_Object first()
public boolean nonEmptyP()
true
if self
has length > 0.
public boolean emptyP()
true
if self
has length 0.
public void printVector(java.io.PrintStream stream)
public List listify()
self
.
public Cons consify()
self
.
consify
in class Stella_Object
public static void resizeVector(Vector self, int size)
self
to size
. If size
is smaller
than the current size of self
the vector will be truncated. Otherwise,
the internal array of self
will be grown to size
and unused elements
will be initialized to NULL.
self
- size
- public void initializeVector()
public void printObject(java.io.PrintStream stream)
printObject
in class Stella_Object
public static Stella_Object accessVectorSlotValue(Vector self, Symbol slotname, Stella_Object value, boolean setvalueP)
public Surrogate primaryType()
Stella_Object
self
.
Gets defined automatically for every non-abstract subclass of OBJECT.
primaryType
in class Stella_Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |