Package java.util

Examples of java.util.Vector.removeElementAt()


        states.removeElementAt(0) ;
    qmax = state.getQ() ;
    i = 1 ;
      } else {
    if ( state.getQ() < qmax)
        states.removeElementAt(i) ;
    else
        i++;
      }
  }
  if ( debug )
View Full Code Here


  // if numeric, reverse the order of tokens
  if(isnum) {
      int vs = vlhs.size();
      for(int i=0; i<vs;i++) {
    vlhs.addElement(vlhs.elementAt(vs-i-1));
    vlhs.removeElementAt(vs-i-1);
      }
  }
  String slhs[] = new String[vlhs.size()];
  vlhs.copyInto(slhs);
  // Build a rule instance:
View Full Code Here

    while (editted) {
      editted = false;
      for (int i=1; i<components.size() && !editted; i++) {
  String s = (String)components.elementAt(i);
  if (s.equals(".")) {//NOI18N
    components.removeElementAt(i);
    components.removeElementAt(i-1);
    editted = true;
  } else if (s.equals("..")) {//NOI18N
    components.removeElementAt(i);
    components.removeElementAt(i-1);
View Full Code Here

      editted = false;
      for (int i=1; i<components.size() && !editted; i++) {
  String s = (String)components.elementAt(i);
  if (s.equals(".")) {//NOI18N
    components.removeElementAt(i);
    components.removeElementAt(i-1);
    editted = true;
  } else if (s.equals("..")) {//NOI18N
    components.removeElementAt(i);
    components.removeElementAt(i-1);
    if (i > 2) {
View Full Code Here

  if (s.equals(".")) {//NOI18N
    components.removeElementAt(i);
    components.removeElementAt(i-1);
    editted = true;
  } else if (s.equals("..")) {//NOI18N
    components.removeElementAt(i);
    components.removeElementAt(i-1);
    if (i > 2) {
      if (!((String)components.elementAt(i-2)).equals(File.separator) &&
    ((String)components.elementAt(i-3)).equals(File.separator)) {
        components.removeElementAt(i-2);
View Full Code Here

    components.removeElementAt(i);
    components.removeElementAt(i-1);
    editted = true;
  } else if (s.equals("..")) {//NOI18N
    components.removeElementAt(i);
    components.removeElementAt(i-1);
    if (i > 2) {
      if (!((String)components.elementAt(i-2)).equals(File.separator) &&
    ((String)components.elementAt(i-3)).equals(File.separator)) {
        components.removeElementAt(i-2);
        components.removeElementAt(i-3);
View Full Code Here

    components.removeElementAt(i);
    components.removeElementAt(i-1);
    if (i > 2) {
      if (!((String)components.elementAt(i-2)).equals(File.separator) &&
    ((String)components.elementAt(i-3)).equals(File.separator)) {
        components.removeElementAt(i-2);
        components.removeElementAt(i-3);
      }
    }
    editted = true;
  }
View Full Code Here

    components.removeElementAt(i-1);
    if (i > 2) {
      if (!((String)components.elementAt(i-2)).equals(File.separator) &&
    ((String)components.elementAt(i-3)).equals(File.separator)) {
        components.removeElementAt(i-2);
        components.removeElementAt(i-3);
      }
    }
    editted = true;
  }
      }
View Full Code Here

    /* Remove a trailing File.separatorChar */
    if (components.size() > 0 &&
  ((String)components.elementAt(components.size()-1)).equals(
    File.separator))
      components.removeElementAt(components.size()-1);

    StringBuffer result = new StringBuffer();
    for (int j=0; j<components.size(); j++)
      result.append((String)components.elementAt(j));

View Full Code Here

        for (int i = 0; i < arr.size(); i++)
        {
            tmp.addElement(arr.elementAt(i));
        }
        retval.addElement(tmp.elementAt(0));
        tmp.removeElementAt(0);
        while (tmp.size() != 0)
        {
            retval.insertElementAt(tmp.elementAt(0), getInt(rand, retval.size() + 1));
            tmp.removeElementAt(0);
        }
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.