Package java.util

Examples of java.util.Vector.removeElementAt()


            // Get key including "="
            String key = env[i].substring(0, pos + 1);
            int size = osEnv.size();
            for (int j = 0; j < size; j++) {
                if (((String) osEnv.elementAt(j)).startsWith(key)) {
                    osEnv.removeElementAt(j);
                    break;
                }
            }
            osEnv.addElement(env[i]);
        }
View Full Code Here


            // Remove MessageEntries since they are not mapped
            int index = 0;
            while (index < v.size()) {
                if (v.elementAt(index) instanceof MessageEntry) {
                    v.removeElementAt(index);
                } else {
                    index++;
                }
            }
View Full Code Here

        // remove the first token it's made of the indentation string and the
        // construct name, we'll need all this to figure out what type of
        // construct it is since we lost all semantics :(
        // (#indent[/]*)(#construct.*)
        String name = (String) metrics.elementAt(0);
        metrics.removeElementAt(0);
        int indent = 0;
        pos = name.lastIndexOf('/');
        if (pos != -1) {
            name = name.substring(pos + 1);
            indent = pos + 1; // indentation is last position of token + 1
View Full Code Here

    }
    if (_i >= _poa_array.length){
        //remove surplus nodes
        for (int _j = _poas.size() - 1; _j >= _i; _j--){
        DefaultMutableTreeNode _poa = (DefaultMutableTreeNode) _poas.elementAt(_j);
        _poas.removeElementAt(_j);
        m_tree_model.removeNodeFromParent(_poa);
        }
    }
    else{
        // build new nodes
View Full Code Here

    DefaultMutableTreeNode _server_node = (DefaultMutableTreeNode) m_server_nodes.elementAt(index);
    Vector _poas = (Vector) m_poa_nodes.elementAt(index);

    for (int _j = _poas.size() - 1; _j >= 0; _j--){
        DefaultMutableTreeNode _poa = (DefaultMutableTreeNode) _poas.elementAt(_j);
        _poas.removeElementAt(_j);
        m_tree_model.removeNodeFromParent(_poa);
    }

    m_server_nodes.removeElementAt(index);
    m_tree_model.removeNodeFromParent(_server_node);
View Full Code Here

    try {
      int index = lookup(v, key);

      if(index >= 0) {
  elements--; // Count
  v.removeElementAt(index);
      }
    } catch(ArrayIndexOutOfBoundsException e) {}
  }

  private static final int lookup(Vector v, String key)
View Full Code Here

        // remove the first token it's made of the indentation string and the
        // construct name, we'll need all this to figure out what type of
        // construct it is since we lost all semantics :(
        // (#indent[/]*)(#construct.*)
        String name = (String) metrics.elementAt(0);
        metrics.removeElementAt(0);
        int indent = 0;
        pos = name.lastIndexOf('/');
        if (pos != -1) {
            name = name.substring(pos + 1);
            indent = pos + 1; // indentation is last position of token + 1
View Full Code Here

            // Get key including "="
            String key = env[i].substring(0, pos + 1);
            int size = osEnv.size();
            for (int j = 0; j < size; j++) {
                if (((String) osEnv.elementAt(j)).startsWith(key)) {
                    osEnv.removeElementAt(j);
                    break;
                }
            }
            osEnv.addElement(env[i]);
        }
View Full Code Here

        // count-down is OK for deletions!
        for (int i = nodeListeners.size() - 1; i >= 0; --i) {
            LEntry le = (LEntry) nodeListeners.elementAt(i);
            if (le.useCapture == useCapture && le.listener == listener &&
               le.type.equals(type)) {
                nodeListeners.removeElementAt(i);
                // Storage management: Discard empty listener lists
                if (nodeListeners.size() == 0)
                    setEventListeners(node, null);

                // Remove active listener
View Full Code Here

      {
         if (log.isDebugEnabled())
            log.debug("Pushing gzip-input-stream");

         resp.inp_stream = new GZIPInputStream(resp.inp_stream);
         pce.removeElementAt(pce.size() - 1);
         resp.deleteHeader("Content-length");
      }
      else if (encoding.equalsIgnoreCase("deflate"))
      {
         if (log.isDebugEnabled())
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.