List of utility methods to do Vector from String
Vector | parseArgumentVector(String argStr) parse Argument Vector Vector result = new Vector(); StringBuffer argBuf = new StringBuffer(); boolean backSlash = false; boolean matchSglQuote = false; boolean matchDblQuote = false; for (int cIdx = 0; cIdx < argStr.length(); ++cIdx) { char ch = argStr.charAt(cIdx); switch (ch) { ... |
Vector | reverseVector(final Vector returns the reversed vector of the input vector Vector<String> ret = new Vector<String>(); for (int i = src.size(); i > 0; i--) { ret.addElement((String) src.elementAt(i - 1)); return ret; |
Vector | reverseVector(Vector reverse Vector Collections.reverse(rc);
return rc;
|
Vector | string2Vector(String s, String delimiter) Deserializing a string into a vector using a given delimiter to find single tokens. if (s == null || delimiter == null) { return null; Vector v = new Vector(); StringTokenizer st = new StringTokenizer(s, delimiter); while (st.hasMoreTokens()) { v.add(st.nextToken()); return v; |
Vector | stringArrayToVector(String[] array) Put in a string array and get back a Vector! if (array == null) return new Vector(0); Vector vector = new Vector(array.length); for (int i = 0; i < array.length; i++) { vector.addElement(array[i]); return vector; |
Vector | stringToVector(String[] arr) string To Vector if (arr == null) { return null; Vector a = new Vector(); for (int i = 0; i < arr.length; i++) { a.add(arr[i].trim()); return a; ... |
Vector | stringVector(String input, String sepChars) This method takes a sepChars-separated string and converts it to a vector of fields. Vector results = new Vector(); int index = 0; int oldindex = 0; String temp; char inputAry[] = input.toCharArray(); while (index != -1) { for (; oldindex < input.length(); oldindex++) { if (sepChars.indexOf(inputAry[oldindex]) == -1) { ... |
Vector | unique(Vector unique Vector<String> newList = new Vector<String>(); Iterator<String> iterator = list.iterator(); while (iterator.hasNext()) { String text = iterator.next(); if (!newList.contains(text)) newList.add(text); return newList; ... |
boolean | vectorContainsIgnoreCaseFirstLetter(Vector v, String value) vector Contains Ignore Case First Letter for (int i = 0; i < v.size(); i++) { String s = (String) v.elementAt(i); if (equalsIgnoreCaseFirstLetter(s, value)) return true; return false; |
Vector | vectorString(String splitStr, String delim) vector String boolean tokeWasColon = false; int i, count; StringTokenizer toker; Vector result = new Vector(); toker = new StringTokenizer(splitStr, delim, true); count = toker.countTokens(); for (i = 0; i < count; ++i) { String toke; ... |