| Overview | Module | Function | Class | Tea 3.2.4 Reference Documentation © 2009 PDM&FC |
TVector
TVector represents an ordered set of objects.
Each object in the set is indexed by an integer value. The indexes
range from zero (the first element) to the number of elements minus
one.
|
|
TVector append anObject ...
Inserts one or more elements at the end of the TVector.
TVector. Each one of
the arguments passed to the method is inserted at the end of the
TVector. The number of elements in the
TVector is increased acordingly.
TVector clear
Removes all the elements from the TVector.
TVector constructor [theSize]
Initializes a TVector with a given number of
arguments.
theSize elements. All elements
are set to the null object. If theSize is not specified
then it is taken to be zero.
TVector getAt index
Fetches one element of the TVector at a given
position.
index position.
index is negative or equal to or larger than
the size of the TVector then a runtime error ocurrs.
TVector getElements
Fetches a list containing the TVector elements.
TVector elements.
TVector.
TVector getSize
Fetches the number of elements in the TVector.
TVector.
TVector init [obj1 ...]
Initializes the TVector object with a given set of
elements.
TVector.
TVector with the set
of elements received as arguments.
TVector pop
Retrieves and removes the last element of the TVector.
TVector.
TVector has no elements then a runtime error
ocurrs.
TVector push anObject
Inserts a new element at the end of the TVector.
TVector. The new
anObject element is inserted at the end of the
TVector. The number of elements in the
TVector is increased by one.
This method performs the same operation as the append
method when called with one argument.
TVector resize newSize
Changes the size of the TVector.
TVector.
TVector dimensions. If newSize
is smaller than the current size of the TVector
then the excedent elements are discarded. If newSize
is larger than the TVector current size then all
the existing elements are retained and the new elements are initialized
with the null object.
TVector setAt anObject index
Changes one element of the TVector at a given
position.
index position.
index is negative or equal to or larger than
the size of the TVector then a runtime error ocurrs.
TVector sort aFunction
Sorts the elements of the TVector acording to a
comparison function.
aFunction will always be called with
two arguments. The arguments will be elements of the
TVector. The function aFunction is supposed
to return a negative, zero or positive value if its first argument is
less than, equal to or greater than its second argument.
| Overview | Module | Function | Class | Tea 3.2.4 Reference Documentation © 2009 PDM&FC |