Class Vector

This class represents a Vector, in which you can add objects of the type String..

Constructors

Vector(Integer[])

Pass a number array to convert into a new object.

Declaration

Vector Vector(Integer[] value)

Parameters

Type Name Description
Integer[] value An Integer array.

Type Description
Vector

Methods

parseString(String, String)

Parses a text into a vector. The fields in the string are separated by the given delimiter.

Declaration

Void parseString(String text, String delimiter)

Parameters

Type Name Description
String text The string to be parsed.
String delimiter The delimiter for the fields.

Returns

Type Description

removeAt(Integer)

Removes an element at the specified index.

Declaration

Void removeAt(Integer index)

Parameters

Type Name Description
Integer index The index (starting at 0) of the element to remove from the vector.

Returns

Type Description

get(Integer)

Returns an element in the vector at the given position.

Declaration

String get(Integer index)

Parameters

Type Name Description
Integer index The index (starting at 0) of the element to be retrieved.

Returns

Type Description
String

set(Integer, String)

Sets the value at the specified index.

Declaration

Void set(Integer index, String value)

Parameters

Type Name Description
Integer index The index of the vector to set the value.
String value The value to set at the specified index.

Returns

Type Description

size()

Returns the size of the vector.

Declaration

Integer size()

Returns

Type Description
Integer

toIntegerArray()

Convert a vector to an integer array.

Declaration

Integer[] toIntegerArray()

Returns

Type Description
Integer[]

toStringArray()

Convert a vector to a string array.

Declaration

String[] toStringArray()

Returns

Type Description
String[]

buildString(String)

Returns a string of all the elements in the vector, separated by the specified delimiter.

Declaration

String buildString(String delimiter)

Parameters

Type Name Description
String delimiter The delimiter used for separating the elements.

Returns

Type Description
String A string with all the elements separated by the delimiter.

pushBack(String)

Pushes a string object to the end of the vector.

Declaration

Void pushBack(String element)

Parameters

Type Name Description
String element The string object to push on the vector.

Returns

Type Description