List of usage examples for java.util Vector add
public void add(int index, E element)
From source file:com.headstrong.npi.raas.Utils.java
public static String[] insertSection(int index, String insertStr, String[] strArray) { // strArray==null assign a new array strArray = strArray != null ? strArray : new String[0]; Vector<String> arrayVector = new Vector<String>(Arrays.asList(strArray)); arrayVector.add(index, insertStr); String[] returnStr = (String[]) arrayVector.toArray(new String[0]); return returnStr; }
From source file:com.greenpepper.repository.FileSystemRepository.java
private Vector<Object> toHierarchyNodeVector(File file) { Vector<Object> vector = new Vector<Object>(); vector.add(0, URIUtil.relativize(root.getAbsolutePath(), file.getAbsolutePath())); vector.add(1, !file.isDirectory());//ww w .j a v a 2 s. c om vector.add(2, false); Hashtable<String, Object> hashtable = new Hashtable<String, Object>(); if (file.isDirectory() && file.listFiles() != null) { File[] files = file.listFiles(NOT_HIDDEN); if (files != null) { for (File node : files) { try { hashtable.put(node.getName(), toHierarchyNodeVector(node)); } catch (Exception e) { // URI not standard skip it ! } } } } vector.add(3, hashtable); return vector; }