Here you can find the source of reverseVector(final Vector
Parameter | Description |
---|---|
src | the Vector to reverse |
public static Vector<String> reverseVector(final Vector<String> src)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**/*from ww w . ja va 2 s. c o m*/ * returns the reversed vector of the input vector * * @param src * the Vector to reverse * @return the reversed Vector */ public static Vector<String> reverseVector(final Vector<String> src) { Vector<String> ret = new Vector<String>(); for (int i = src.size(); i > 0; i--) { ret.addElement((String) src.elementAt(i - 1)); } return ret; } }