Returns a new vector that is a fragment of the specified vector. The fragment begins at the specified beginIndex and extends to the element at index endIndex-1. Thus the length of the fragment is endIndex-beginIndex.

Parameters:

v

The source vector.
beginIndex
The beginning index, inclusive.
endIndex
The ending index, exclusive. If not specified, v.size() is assumed.

Returns:

The new vector with the elements from the specified fragment in the source vector. If the source vector is null, the returned result is null.
Tip:

You may call this function in a method-like style:

v.subVector(beginIndex, endIndex)