Package java.util

Examples of java.util.Enumeration


    // build option string
    result.append("\n");
    result.append(saver.getClass().getName().replaceAll(".*\\.", ""));
    result.append(" options:\n\n");
    Enumeration enm = saver.listOptions();
    while (enm.hasMoreElements()) {
      option = (Option) enm.nextElement();
      result.append(option.synopsis() + "\n");
      result.append(option.description() + "\n");
    }

    return result.toString();
View Full Code Here


   * @param o the object to perform some additional processing on
   * @return the processed object
   * @throws Exception if post-processing fails
   */
  protected Object readPostProcess(Object o) throws Exception {
    Enumeration             enm;
    Vector                  deserialized;
    Object                  key;

    deserialized = (Vector) super.readPostProcess(o);
   
    // rebuild the actual connections
    rebuildBeanConnections(deserialized, REGULAR_CONNECTION);

    // rebuild the references in the MetaBeans
    enm = m_BeanConnectionRelation.keys();
    while (enm.hasMoreElements()) {
      key = enm.nextElement();
     
      // skip the regular connections
      if (!(key instanceof MetaBean))
        continue;
     
View Full Code Here

    ArrayList<String> values = new ArrayList<String>(tempHash.size());
    // add dummy objects in order to make the ArrayList's size == capacity
    for (int z = 0; z < tempHash.size(); z++) {
      values.add("dummy");
    }
    Enumeration e = tempHash.keys();
    while (e.hasMoreElements()) {
      Object ob = e.nextElement();
      //    if (ob instanceof Double) {
      int index = ((Integer)tempHash.get(ob)).intValue();
      String s = ob.toString();
      if (s.startsWith("'") || s.startsWith("\""))
        s = s.substring(1, s.length() - 1);
View Full Code Here

    result.addElement(new Option(
        "\tThe string representing a missing value.\n"
        + "\t(default: ?)",
        "M", 1, "-M <str>"));
   
    Enumeration en = super.listOptions();
    while (en.hasMoreElements())
      result.addElement((Option)en.nextElement());
     
    return result.elements();
  }
View Full Code Here

    }
    result.append(">\n");

    if (loader instanceof OptionHandler) {
      result.append("\nOptions:\n\n");
      Enumeration enm = ((OptionHandler) loader).listOptions();
      while (enm.hasMoreElements()) {
  option = (Option) enm.nextElement();
  result.append(option.synopsis() + "\n");
  result.append(option.description() + "\n");
      }
    }
   
View Full Code Here

   * @param not   the notification to send.
   */
  protected final void
  sendTo(RoleMultiple role, Notification not) {
    if (role == null) return;
    Enumeration to = role.getListeners();
    if (to == null)
      return;
    while (to.hasMoreElements())
      sendTo((AgentId) to.nextElement(), not);
  }
View Full Code Here

    } // end for (int i=0; i<totalnumberofrows; i++)
 
    returnmap.put("calendarlist", calendarlist);
    // get the unscheduledactivities and scheduledactivities and shove them onto
    // the return.
    Enumeration unsheduledenum = unscheduledactivity.elements();
    while (unsheduledenum.hasMoreElements()) {
      CalendarActivityObject activityobject = (CalendarActivityObject)unsheduledenum.nextElement();
      unsheduledMap.put(activityobject.getActivityID(), activityobject);
    }
 
    Enumeration scheduledenum = scheduledactivitydaily.elements();
    while (scheduledenum.hasMoreElements()) {
      CalendarActivityObject activityobject = (CalendarActivityObject)scheduledenum.nextElement();
      scheduledMap.put(activityobject.getActivityID(), activityobject);
    }
 
    returnmap.put("unscheduledactivity", unsheduledMap);
    returnmap.put("scheduledactivity", scheduledMap);
View Full Code Here

        String file = null;
        try {

            // loop through all initialization parameter pairs
            HashMap map = new HashMap();
            Enumeration pnum = servlet.getInitParameterNames();
            ServletContext serv = servlet.getServletContext();
            while (pnum.hasMoreElements()) {

                // parameter name is path and value is service definition file
                path = (String) pnum.nextElement();
                file = "/WEB-INF/" + servlet.getInitParameter(path);
                InputStream is = null;
                try {
                    is = serv.getResourceAsStream(file);
                    if (is == null) {
View Full Code Here

      String accountType = accountVO.getAccountType();
      emailListForm.set("accountType", accountType);

      // This approach dirties the session, try to clean it up a bit.
      Enumeration nameEnum = session.getAttributeNames();
      while (nameEnum.hasMoreElements()) {
        String element = (String)nameEnum.nextElement();
        Object o = session.getAttribute(element);
        if (o instanceof BackgroundMailCheck) {
          if (!((BackgroundMailCheck)o).isAlive()) {
            session.removeAttribute("element");
          }
View Full Code Here

        // get user id
        Integer user = (Integer)allUsers.next();
        Vector activityObjects = (Vector)userActivities.get(user);
        AvailableList avlList = (AvailableList)userIdNames.get(user);
        boolean activityArray[] = avlList.getAvailable();
        Enumeration activityEnum = activityObjects.elements();

        while (activityEnum.hasMoreElements()) {
          CalendarActivityObject activityobject = (CalendarActivityObject)activityEnum
              .nextElement();

          GregorianCalendar starttime = activityobject.getStartTime();
          GregorianCalendar endtime = activityobject.getEndTime();
View Full Code Here

TOP

Related Classes of java.util.Enumeration

Copyright © 2018 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.