Java Utililty Methods Vector Create

List of utility methods to do Vector Create

Description

The list of methods to do Vector Create are organized into topic(s).

Method

VectorcreateVector(Object[] array)
create Vector
Vector v = new Vector();
for (int i = 0; i < array.length; ++i)
    v.addElement(array[i]);
return v;
VectormakeVector(String[] O)
make Vector
final Vector V = new Vector();
if (O != null)
    for (final String element : O)
        V.addElement(element);
return V;
booleanparseLinesFromLast(byte[] bytearray, int lineCount, Vector lastNlines)
Given a byte array this method: a.
String lastNChars = new String(bytearray);
StringBuffer sb = new StringBuffer(lastNChars);
lastNChars = sb.reverse().toString();
StringTokenizer tokens = new StringTokenizer(lastNChars, "\n");
while (tokens.hasMoreTokens()) {
    StringBuffer sbLine = new StringBuffer((String) tokens.nextToken());
    lastNlines.add(sbLine.reverse().toString());
    if (lastNlines.size() == lineCount) {
...
String[]tokenVector(String s, String delimiters)
token Vector
return tokenArray(new StringTokenizer(s, delimiters));
VectorToVector(byte[] in)
To Vector
if (in == null)
    return null;
Vector v = new Vector();
for (int i = 0, s = in.length; i < s; i++)
    v.addElement(new Byte(in[i]));
return v;
VectortoVector(Enumeration pEnumeration_)
Enumeration to Vector converter.
Vector vRetVal = new Vector();
if (pEnumeration_ == null) {
    return vRetVal;
while (pEnumeration_.hasMoreElements()) {
    vRetVal.addElement(pEnumeration_.nextElement());
return vRetVal;
...
VectortoVector(Object[] array)
to Vector
Vector vector = new Vector();
return addArray(vector, array);
VectortoVector(T[] array)
Creates a vector and fills it with the elements of the specified array.
if (array == null) {
    return new Vector<T>();
} else {
    Vector<T> vector = new Vector<T>(array.length);
    for (int i = 0; i < array.length; i++) {
        vector.addElement(array[i]);
    return vector;
...