Examples of Vector


Examples of java.util.Vector

  /**
   * removes the undo history
   */
  public void clearUndo() {
    m_UndoList = new Vector();
  }
View Full Code Here

Examples of java.util.Vector

   *
   * @return an enumeration of all the available options
   */
  public Enumeration listOptions()  {

    Vector vec = new Vector(4);
   
    vec.addElement(new Option(
       "\tSets the method to use. Valid values are 0 (1-against-all),\n"
       +"\t1 (random codes), 2 (exhaustive code), and 3 (1-against-1). (default 0)\n",
       "M", 1, "-M <num>"));
    vec.addElement(new Option(
       "\tSets the multiplier when using random codes. (default 2.0)",
       "R", 1, "-R <num>"));
    vec.addElement(new Option(
        "\tUse pairwise coupling (only has an effect for 1-against1)",
        "P", 0, "-P"));

    Enumeration enu = super.listOptions();
    while (enu.hasMoreElements()) {
      vec.addElement(enu.nextElement());
    }
    return vec.elements();
  }
View Full Code Here

Examples of java.util.Vector

   * Returns an enumeration describing the available options <p>
   *
   * @return an enumeration of all options
   */
   public Enumeration listOptions () {
     Vector result = new Vector();

     result.addElement(
         new Option("\tSQL query to execute.",
                    "Q",1,"-Q <query>"));
    
     result.addElement(
         new Option("\tReturn sparse rather than normal instances.",
                    "S", 0, "-S"));
    
     result.addElement(
         new Option("\tThe username to use for connecting.",
                    "U", 1, "-U <username>"));
    
     result.addElement(
         new Option("\tThe password to use for connecting.",
                    "P", 1, "-P <password>"));
    
     result.addElement(
         new Option("\tEnables debug output.",
                    "D", 0, "-D"));
    
     return result.elements();
   }
View Full Code Here

Examples of java.util.Vector

   *
   * @return an array of strings suitable for passing to setOptions()
   */
  public String[] getOptions () {

    Vector options = new Vector();

    options.add("-Q");
    options.add(getQuery());
    if (getSparseData())
      options.add("-S");

    if (!getUsername().equals("")) {
      options.add("-U");
      options.add(getUsername());
    }

    if (!getPassword().equals("")) {
      options.add("-P");
      options.add(getPassword());
    }

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

    return (String[]) options.toArray(new String[options.size()]);
  }
View Full Code Here

Examples of java.util.Vector

    boolean availablePlugins = false;
   
    // trees
    if (grph != null) {
      // trees
      Vector pluginsVector = GenericObjectEditor.getClassnames(TreeVisualizePlugin.class.getName());
      for (int i = 0; i < pluginsVector.size(); i++) {
  String className = (String) (pluginsVector.elementAt(i));
  try {
    TreeVisualizePlugin plugin = (TreeVisualizePlugin) Class.forName(className).newInstance();
    if (plugin == null)
      continue;
    availablePlugins = true;
View Full Code Here

Examples of java.util.Vector

   *
   * @throws Exception   if an error occurs
   */
  public DatabaseUtils() throws Exception {
    if (DRIVERS_ERRORS == null)
      DRIVERS_ERRORS = new Vector();

    try {
      PROPERTIES = Utils.readProperties(PROPERTY_FILE);

      // Register the drivers in jdbc DriverManager
View Full Code Here

Examples of java.util.Vector

   * Return an enumeration of user activated requests for this bean
   *
   * @return an <code>Enumeration</code> value
   */
  public Enumeration enumerateRequests() {
    Vector newVector = new Vector(0);
    if (m_evaluateThread != null) {
      newVector.addElement("Stop");
    }
    return newVector.elements();
  }
View Full Code Here

Examples of java.util.Vector

   * Notify all text listeners of a TextEvent
   *
   * @param te a <code>TextEvent</code> value
   */
  private void notifyTextListeners(TextEvent te) {
    Vector l;
    synchronized (this) {
      l = (Vector)m_textListeners.clone();
    }
    if (l.size() > 0) {
      for(int i = 0; i < l.size(); i++) {
  //  System.err.println("Notifying text listeners "
  //         +"(ClassifierPerformanceEvaluator)");
  ((TextListener)l.elementAt(i)).acceptText(te);
      }
    }
  }
View Full Code Here

Examples of java.util.Vector

   * Notify all ThresholdDataListeners of a ThresholdDataEvent
   *
   * @param te a <code>ThresholdDataEvent</code> value
   */
  private void notifyThresholdListeners(ThresholdDataEvent re) {
    Vector l;
    synchronized (this) {
      l = (Vector)m_thresholdListeners.clone();
    }
    if (l.size() > 0) {
      for(int i = 0; i < l.size(); i++) {
  //  System.err.println("Notifying text listeners "
  //         +"(ClassifierPerformanceEvaluator)");
  ((ThresholdDataListener)l.elementAt(i)).acceptDataSet(re);
      }
    }
  }
View Full Code Here

Examples of java.util.Vector

   * Notify all VisualizableErrorListeners of a VisualizableErrorEvent
   *
   * @param te a <code>VisualizableErrorEvent</code> value
   */
  private void notifyVisualizableErrorListeners(VisualizableErrorEvent re) {
    Vector l;
    synchronized (this) {
      l = (Vector)m_visualizableErrorListeners.clone();
    }
    if (l.size() > 0) {
      for(int i = 0; i < l.size(); i++) {
  //  System.err.println("Notifying text listeners "
  //         +"(ClassifierPerformanceEvaluator)");
  ((VisualizableErrorListener)l.elementAt(i)).acceptDataSet(re);
      }
    }
  }
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.