Package java.util

Examples of java.util.Enumeration


   
    /**
     * Reset the statistics back to zero
     */
    public synchronized void clear() {
        Enumeration e = clients.elements();
        while (e.hasMoreElements()) {
            FTPClientInterface client = (FTPClientInterface)e.nextElement();
            client.resetDownloadCount();
            client.resetDeleteCount();
            client.resetUploadCount();
        }
    }
View Full Code Here


    if (getDirectory() == null)
      throw new IOException("No directory/source has been specified");
   
    String directoryPath = getDirectory().getAbsolutePath();
    ArrayList<String> classes = new ArrayList<String>();
    Enumeration enm = getStructure().classAttribute().enumerateValues();
    while (enm.hasMoreElements())
      classes.add((String)enm.nextElement());
   
    Instances data = getStructure();
    int fileCount = 0;
    for (int k = 0; k < classes.size(); k++) {
      String subdirPath = (String) classes.get(k);
View Full Code Here

    "\nUsage:\n"
    + "\tTextDirectoryLoader [options]\n"
    + "\n"
    + "Options:\n");

      Enumeration enm = ((OptionHandler) new TextDirectoryLoader()).listOptions();
      while (enm.hasMoreElements()) {
  Option option = (Option) enm.nextElement();
  System.err.println(option.synopsis());
  System.err.println(option.description());
      }
     
      System.err.println();
View Full Code Here

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

    Vector newVector = new Vector(1);
    Enumeration enu = super.listOptions();
    while (enu.hasMoreElements()) {
      newVector.addElement(enu.nextElement());
    }

    newVector.addElement(new Option(
              "\tName of a directory to search for cost files when loading\n"
              +"\tcosts on demand (default current directory).",
View Full Code Here

    FastVector[] rules;

    // Build rules
    for (int j = 1; j < m_Ls.size(); j++) {
      FastVector currentItemSets = (FastVector)m_Ls.elementAt(j);
      Enumeration enumItemSets = currentItemSets.elements();
      while (enumItemSets.hasMoreElements()) {
  AprioriItemSet currentItemSet = (AprioriItemSet)enumItemSets.nextElement();
        //AprioriItemSet currentItemSet = new AprioriItemSet((ItemSet)enumItemSets.nextElement());
  rules=currentItemSet.generateRulesBruteForce(m_minMetric,m_metricType,
          m_hashtables,j+1,
          m_instances.numInstances(),
          m_significanceLevel);
View Full Code Here

  (m_Template instanceof OptionHandler)) {
      newVector.addElement(new Option(
       "",
       "", 0, "\nOptions specific to classifier "
       + m_Template.getClass().getName() + ":"));
      Enumeration enu = ((OptionHandler)m_Template).listOptions();
      while (enu.hasMoreElements()) {
  newVector.addElement(enu.nextElement());
      }
    }
    return newVector.elements();
  }
View Full Code Here

  /**
   * Stop any classifier action
   */
  public void stop() {
    // tell all listenees (upstream beans) to stop
    Enumeration en = m_listenees.keys();
    while (en.hasMoreElements()) {
      Object tempO = m_listenees.get(en.nextElement());
      if (tempO instanceof BeanCommon) {
  ((BeanCommon)tempO).stop();
      }
    }
   
View Full Code Here

    FastVector[] rules;
    // Build rules
    for (int j = 1; j < m_Ls.size(); j++) {
      FastVector currentItemSets = (FastVector)m_Ls.elementAt(j);
      Enumeration enumItemSets = currentItemSets.elements();
      while (enumItemSets.hasMoreElements()) {
  AprioriItemSet currentItemSet = (AprioriItemSet)enumItemSets.nextElement();
        //AprioriItemSet currentItemSet = new AprioriItemSet((ItemSet)enumItemSets.nextElement());
  rules = currentItemSet.generateRules(m_minMetric, m_hashtables, j + 1);
  for (int k = 0; k < rules[0].size(); k++) {
    m_allTheRules[0].addElement(rules[0].elementAt(k));
    m_allTheRules[1].addElement(rules[1].elementAt(k));
View Full Code Here

    // can produce
    if (m_AdditionalMeasures != null && m_AdditionalMeasures.length > 0) {
      m_doesProduce = new boolean [m_AdditionalMeasures.length];

      if (m_Template instanceof AdditionalMeasureProducer) {
  Enumeration en = ((AdditionalMeasureProducer)m_Template).
    enumerateMeasures();
  while (en.hasMoreElements()) {
    String mname = (String)en.nextElement();
    for (int j=0;j<m_AdditionalMeasures.length;j++) {
      if (mname.compareToIgnoreCase(m_AdditionalMeasures[j]) == 0) {
        m_doesProduce[j] = true;
      }
    }
View Full Code Here

   * @return an enumeration of the measure names
   */
  public Enumeration enumerateMeasures() {
    Vector newVector = new Vector();
    if (m_Template instanceof AdditionalMeasureProducer) {
      Enumeration en = ((AdditionalMeasureProducer)m_Template).
  enumerateMeasures();
      while (en.hasMoreElements()) {
  String mname = (String)en.nextElement();
  newVector.addElement(mname);
      }
    }
    return newVector.elements();
  }
View Full Code Here

TOP

Related Classes of java.util.Enumeration

Copyright © 2015 www.massapicom. 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.