Package java.util

Examples of java.util.Vector.toArray()


      }
      rs.close();
      s.close();

      String[] result = new String[v.size()];
      result = (String[]) v.toArray(result);

      return result;
    } catch (SQLException sqle) {
      if (sqle instanceof com.mysql.jdbc.CommunicationsException && !reconnectLoop) {
          logger.log(BasicLevel.WARN, "Database reconnection problem at list, Reconnecting");
View Full Code Here


    // at least one filter
    if (objects.size() == 0)
      objects.add(new AllFilter());

    setFilters((Filter[]) objects.toArray(new Filter[objects.size()]));

    objects = new Vector();
    while ((tmpStr = Utils.getOption("R", options)).length() != 0) {
      if (tmpStr.startsWith("inv(") && tmpStr.endsWith(")")) {
  range = new Range(tmpStr.substring(4, tmpStr.length() - 1));
View Full Code Here

    // at least one Range
    if (objects.size() == 0)
      objects.add(new Range("first-last"));

    setRanges((Range[]) objects.toArray(new Range[objects.size()]));

    // is number of filters the same as ranges?
    checkDimensions();
  }
View Full Code Here

  tmpStr = "inv(" + tmpStr + ")";
      result.add("-R");
      result.add(tmpStr);
    }

    return (String[]) result.toArray(new String[result.size()]);
  }

  /**
   * checks whether the dimensions of filters and ranges fit together.
   *
 
View Full Code Here

      result.add(options[i]);

    result.add("-model");
    result.add("" + getModelFile());

    return (String[]) result.toArray(new String[result.size()]);   
  }

  /**
   * Parses the options for this object. <p/>
   *
 
View Full Code Here

    }

    if (getDebug())
      options.add("-D");

    return (String[]) options.toArray(new String[options.size()]);
  }

  /**
   * Makes a database query using the query set through the -Q option
   * to convert a table into a set of instances
View Full Code Here

   
    options = super.getOptions();
    for (i = 0; i < options.length; i++)
      result.add(options[i]);
   
    return (String[]) result.toArray(new String[result.size()]);
  }

  /**
   * Parses a given list of options. <p/>
   *
 
View Full Code Here

      }
      else
        ret.add(comp[i]);
    }

    return (MessageComponent[]) ret.toArray(new MessageComponent[0]);
  }

  /**
   * Split a text component to smileys and plain text.
   *
 
View Full Code Here

      }
      else
        ret.add(comp[i]);
    }

    return (MessageComponent[]) ret.toArray(new MessageComponent[0]);
  }

  private static Pattern fontColorPattern = Pattern.compile("(<font\\s+(face\\s*=\\s*\"(.+)\"\\s*)?size\\s*=\\s*\"(\\d+)\">)|(\033\\[((\\d+)|(#([0-9a-fA-F]+)))m)");
  /**
   * Parses a text component to extract font and color information.
View Full Code Here

      tok = new StringTokenizer(split[1], ",");
      for(int j = 0; tok.hasMoreTokens(); j++)
        buddyVector.add(new Buddy(this, tok.nextToken(), split[0]));
    }

    return (Buddy[])buddyVector.toArray(new Buddy[0]);
  }

  /**
   * Process the change in status of a user.
   *
 
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.