Package java.util

Examples of java.util.Iterator


  public int getNumberOfGroups()
  {
    int groups = 0;
    if (this.searchCriteria != null)
    {
      Iterator it = this.searchCriteria.iterator();
      HashMap tempHashMap = new HashMap();
      while (it.hasNext())
      {
        SearchCriteriaVO searchCriteriaVO = (SearchCriteriaVO) it.next();
        tempHashMap.put(new Integer(Integer.parseInt(searchCriteriaVO.getGroupID())), "");
      } //end of while loop (iterator.hasNext())
      groups = tempHashMap.size();
    } //end of if statement (this.searchCriteria != null)
    return groups;
View Full Code Here


  public Integer[] getGroupIDs()
  {
    Collection groupIDs = new ArrayList();
    if (this.searchCriteria != null)
    {
      Iterator it = this.searchCriteria.iterator();
      while (it.hasNext())
      {
        SearchCriteriaVO searchCriteriaVO = (SearchCriteriaVO) it.next();
        if (!groupIDs.contains(new Integer(searchCriteriaVO.getGroupID())))
        {
          groupIDs.add(new Integer(searchCriteriaVO.getGroupID()));
        } //end of if statement (!groupIDs.contains(...
      } //end of while loop (iterator.hasNext())
View Full Code Here

            //clean existing headers
            // otherwise when retrying same header element will add multiple times
            sc.removeHeaders();

            axis2Ctx.getAttachmentMap();
            Iterator itr = axis2Ctx.getEnvelope().getHeader().getChildren();
            while (itr.hasNext()) {
                Object o =itr.next();
                if ( o instanceof OMElement ){
                    sc.addHeader((OMElement)o);
                }
            }
View Full Code Here

    return outputMessage;
  }

  protected ActionMessage firstError(ActionErrors errors, String propertyName)
  {
    Iterator error = errors.get(propertyName);
    ActionMessage message = (ActionMessage) error.next();
    return message;
  }
View Full Code Here

                    throw new DateParseException(ex.getMessage());
            }
            return null;
        }
        else {
            Iterator i = hhmmFormatters.iterator();
            ParseException ex = null;
            while (i.hasNext()) {
                try {
                    hhmmFormatter = (SimpleDateFormat)i.next();
                    return hhmmFormatter.parse(ts);
                }
                catch (ParseException ignore) {
                    ex = ignore; // record last one
                }
View Full Code Here

   * notfies all listener of the change of the model
   *
   * @param e    the event to send to the listeners
   */
  public void notifyListener(TableModelEvent e) {
    Iterator                iter;
    TableModelListener      l;

    // is notification enabled?
    if (!isNotificationEnabled())
      return;
   
    iter = m_Listeners.iterator();
    while (iter.hasNext()) {
      l = (TableModelListener) iter.next();
      l.tableChanged(e);
    }
  }
View Full Code Here

      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(explorerProps));
      expProps.load(bi);
      bi.close();
      bi = null;
      Set keys = expProps.keySet();
      Iterator keysI = keys.iterator();
      while (keysI.hasNext()) {
        String key = (String)keysI.next();
        if (!key.endsWith("Policy")) {
          // See if this key is in the Explorer props
          String existingVal = ExplorerDefaults.get(key, "");
          String toRemove = expProps.getProperty(key);
          if (existingVal.length() > 0) {
View Full Code Here

      bi.close();
      bi = null;
      Properties GPCInputProps = GenericPropertiesCreator.getGlobalInputProperties();
     
      Set keys = expProps.keySet();
      Iterator keysI = keys.iterator();
      while (keysI.hasNext()) {
        String key = (String)keysI.next();
        // see if this key is in the GPC input props
        String existingVal = GPCInputProps.getProperty(key, "");
        if (existingVal.length() > 0) {
          // append
          String newVal = expProps.getProperty(key);
View Full Code Here

      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile));
      expProps.load(bi);
      bi.close();
      bi = null;
      Set keys = expProps.keySet();
      Iterator keysI = keys.iterator();
      while (keysI.hasNext()) {
        String key = (String)keysI.next();
        if (!key.endsWith("Policy")) {
          // See if this key is in the Explorer props
          String existingVal = ExplorerDefaults.get(key, "");
          if (existingVal.length() > 0) {
            // get the replacement policy (if any)
View Full Code Here

     * @param c    the capabilities to get a string representation from
     * @return    the string describing the capabilities
     */
    protected String listCapabilities(Capabilities c) {
      String  result;
      Iterator  iter;
     
      result = "";
      iter   = c.capabilities();
      while (iter.hasNext()) {
        if (result.length() != 0)
    result += ", ";
        result += iter.next().toString();
      }
     
      return result;
    }
View Full Code Here

TOP

Related Classes of java.util.Iterator

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.