Refine search
public FlowList append(FlowList right) { if (_elements == null) { _elements = right._elements; } else { final Vector temp = right._elements; if (temp != null) { final int n = temp.size(); for (int i = 0; i < n; i++) { _elements.addElement(temp.elementAt(i)); } } } return this; }
/** * Return an array containing the names of all currently defined * configuration attributes. If there are no such attributes, a zero * length array is returned. */ public String[] getAttributeNames() { Vector names = new Vector(); Enumeration keys = attributes.keys(); while (keys.hasMoreElements()) { names.addElement((String) keys.nextElement()); } String results[] = new String[names.size()]; for (int i = 0; i < results.length; i++) { results[i] = (String) names.elementAt(i); } return (results); }
private static String[] split(String input, char sep, int limit) { Vector v = new Vector(); boolean limited = (limit > 0); int applied = 0; else { ++applied; v.add(part.toString()); part = new StringBuffer(); ++index; v.add(part.toString()); int last = v.size(); if (0 == limit) { for (int j = v.size() - 1; j >= 0; --j) { String s = (String) v.elementAt(j); if ("".equals(s)) --last; ret[i] = (String) v.elementAt(i);
/** * decode the class name of the given argument, or the class name if the argument is zero */ public String decodeClassName(int argNo) { int idx; if (classes == null) { classes = new Vector(); idx = 0; while (idx >= 0) idx = decodeNextClassName(idx); } if (argNo == 0) return (String) classes.elementAt(classes.size() - 1); else return (String) classes.elementAt(argNo - 1); }
Vector nodes = new Vector(); nodes.addElement(elem); Vector scratchVector = new Vector(); v.setItem(((NodeCompareElem) nodes.elementAt(i)).m_node, i);
public static String[] byteArrToUStringArr(byte[] b) { int off = 0; Vector<String> v = new Vector<>(); while (off < b.length) { int length = byteArrToInt(b, off); if (length != 0) { v.addElement(byteArrToUString(b, off + 4, length)); } else { v.addElement(""); } off = off + 2 * length + 4; } String[] s = new String[v.size()]; for (int i = 0; i < s.length; i++) { s[i] = v.elementAt(i); } return s; }
public Vector getAllValidTemplates() { // Return templates if no imported/included stylesheets if (_includedStylesheets == null) { return _templates; } // Is returned value cached? if (_allValidTemplates == null) { Vector templates = new Vector(); int size = _includedStylesheets.size(); for (int i = 0; i < size; i++) { Stylesheet included =(Stylesheet)_includedStylesheets.elementAt(i); templates.addAll(included.getAllValidTemplates()); } templates.addAll(_templates); // Cache results in top-level stylesheet only if (_parentStylesheet != null) { return templates; } _allValidTemplates = templates; } return _allValidTemplates; }
/** Returns <code>true</code> if the specified appender is in the list of attached appenders, <code>false</code> otherwise. @since 1.2 */ public boolean isAttached(Appender appender) { if(appenderList == null || appender == null) return false; int size = appenderList.size(); Appender a; for(int i = 0; i < size; i++) { a = (Appender) appenderList.elementAt(i); if(a == appender) return true; } return false; }
ComposeState() { int size = m_variables.size(); for (int i = 0; i < size; i++) { ElemVariable ev = (ElemVariable)m_variables.elementAt(i); m_variableNames.addElement(ev.getName()); } }
Vector nodes = new Vector(); nodes.addElement(elem); Vector scratchVector = new Vector(); v.setItem(((NodeCompareElem) nodes.elementAt(i)).m_node, i);
v = new Vector(); Enumeration enumeration = ht.keys(); } else { misses = 0; v.addElement(t); int size = v.size(); for(int i = 0; i < size; i++) { Thread t = (Thread) v.elementAt(i); LogLog.debug("Lazy NDC removal for thread [" + t.getName() + "] ("+ ht.size() + ").");
/** * @return key declarations for the key associated to this KeyTable */ private Vector getKeyDeclarations() { int nDeclarations = m_keyDeclarations.size(); Vector keyDecls = new Vector(nDeclarations); // Walk through each of the declarations made with xsl:key for (int i = 0; i < nDeclarations; i++) { KeyDeclaration kd = (KeyDeclaration) m_keyDeclarations.elementAt(i); // Add the declaration if the name on this key declaration // matches the name on the iterator for this walker. if (kd.getName().equals(getKeyTableName())) { keyDecls.add(kd); } } return keyDecls; }
/** * Add object to vector if not already there. * * @param obj * @param v */ private void addObjectIfNotFound(Object obj, Vector v) { int n = v.size(); boolean addIt = true; for (int i = 0; i < n; i++) { if (v.elementAt(i) == obj) { addIt = false; break; } } if (addIt) { v.addElement(obj); } }
m_namespaceDeclSets=new Vector(); nsList=new SuballocatedIntVector(32); m_namespaceDeclSets.addElement(nsList); nsList=(SuballocatedIntVector)m_namespaceDeclSets.elementAt(last); m_namespaceDeclSets.addElement(nsList);
public static String[] byteArrToAStringArr(byte[] b) { int off = 0; Vector<String> v = new Vector<>(); while (off < b.length) { int length = byteArrToInt(b, off); if (length != 0) { v.addElement(byteArrToAString(b, off + 4, length)); } else { v.addElement(""); } off = off + length + 4; } String[] s = new String[v.size()]; for (int i = 0; i < s.length; i++) { s[i] = v.elementAt(i); } return s; }
/** * @return key declarations for the key associated to this KeyTable */ private Vector getKeyDeclarations() { int nDeclarations = m_keyDeclarations.size(); Vector keyDecls = new Vector(nDeclarations); // Walk through each of the declarations made with xsl:key for (int i = 0; i < nDeclarations; i++) { KeyDeclaration kd = (KeyDeclaration) m_keyDeclarations.elementAt(i); // Add the declaration if the name on this key declaration // matches the name on the iterator for this walker. if (kd.getName().equals(getKeyTableName())) { keyDecls.add(kd); } } return keyDecls; }