Home

Vector

Holds a growable array of base objects

Operations

New

Default constructor

New()

Copy constructor

New(values:Base[])
Parameters
NameTypeDescription
valuesBase[]values to copy

Copy constructor

New(values:Vector)
Parameters
NameTypeDescription
valuesVectorvalues to copy

AddBack

Adds a vector of values to the end of the vector

method : public : AddBack(values:Vector) ~ Nil
Parameters
NameTypeDescription
valuesVectorvalues to append

Adds a value to the end

method : public : AddBack(value:Base) ~ Nil
Parameters
NameTypeDescription
valueBasevalue to append

Empty

Clears the vector

method : public : Empty() ~ Nil

Find

Removes an element from the vector

method : public : Find(value:Base) ~ Int
Parameters
NameTypeDescription
valueBasevalue to remove

Get

Gets an indexed value

method : public : Get(index:Int) ~ Base
Parameters
NameTypeDescription
indexIntindex

Return
TypeDescription
Basevalue

IsEmpty

Checks to see if the vector is empty

method : public : IsEmpty() ~ Bool
Return
TypeDescription
Booltrue if empty, false otherwise

Remove

Removes an indexed value

method : public : Remove(i:Int) ~ Base
Parameters
NameTypeDescription
iIntindex

Return
TypeDescription
Basevalue

RemoveBack

Removes the last value

method : public : RemoveBack() ~ Base
Return
TypeDescription
Basevalue

Set

Sets an indexed value

method : public : Set(value:Base, index:Int) ~ Bool
Parameters
NameTypeDescription
valueBasevalue
indexIntindex

Size

Size of vector

method : public : Size() ~ Int
Return
TypeDescription
Intsize of vector

Swap

Swap two values in the vector

method : public : native : Swap(a:Int, b:Int) ~ Bool
Parameters
NameTypeDescription
aIntfirst value
bIntsecond value

Return
TypeDescription
Booltrue if values were swapped

ToArray

Converts the vector into an object array

method : public : native : ToArray() ~ Base[]
Return
TypeDescription
Base[]objeck array