Package java.util

Examples of java.util.Iterator


   * @return Deep copy of object
   */
  public Object clone() {
      List thisSymbols = getSymbols();
      List copySymbols = new ArrayList(thisSymbols.size());
      Iterator iter = thisSymbols.iterator();
      while(iter.hasNext()) {
        Expression es = (Expression) iter.next();
        copySymbols.add(es.clone());
      }

    return new GroupBy(copySymbols);
  }
View Full Code Here


            return false;
          }
            boolean supportsFunctionsInGroupBy = caps.supportsCapability(Capability.QUERY_FUNCTIONS_IN_GROUP_BY);

            // Also verify that if there is a function that we can support pushdown of functions in group by
            Iterator colIter = groupCols.iterator();
            while(colIter.hasNext()) {
                Expression col = (Expression) colIter.next();
                if(!(col instanceof ElementSymbol) && !supportsFunctionsInGroupBy) {
                    // Function in GROUP BY can't be pushed
                    return false;
                }
            }
View Full Code Here

  }
  String name = null;
  String thisValue = null;
  String thatValue = null;
  Set entries = parameters.entrySet();
  Iterator iterator = entries.iterator();
  Map.Entry entry = null;
  while (iterator.hasNext()) {
      entry = (Map.Entry)iterator.next();
      name = (String)entry.getKey();
      thisValue = (String)entry.getValue();
      thatValue = (String)that.parameters.get(name);
      if ((thisValue == null) || (thatValue == null)) {
    // both null -> equal, only one null -> not equal
View Full Code Here

            //criteria cannot be pushed out of a full outer join clause
            if (joinType == JoinType.JOIN_FULL_OUTER || joinType == JoinType.JOIN_CROSS) {
                continue;
            }
           
            Iterator crits = criteria.iterator();
            while (crits.hasNext()) {
                Criteria crit = (Criteria)crits.next();
                               
                //special case handling for true/false criteria
                if (crit.equals(QueryRewriter.FALSE_CRITERIA) || crit.equals(QueryRewriter.UNKNOWN_CRITERIA)) {
                    if (joinType == JoinType.JOIN_INNER) {
                        FrameUtil.replaceWithNullNode(node);
                    } else {
                        //must be a left or right outer join, replace the inner side with null 
                        FrameUtil.replaceWithNullNode(JoinUtil.getInnerSideJoinNodes(node)[0]);
                        removeCopiedFlag = true;
                    }
                    //since a null node has been created, raise it to its highest point
                    pushRuleRaiseNull = true;
                    treeChanged = true;
                    break;
                } else if (crit.equals(QueryRewriter.TRUE_CRITERIA)) {
                    crits.remove();
                    break;
                }
               
                if (pushCriteria(node, crit)) {
                    treeChanged = true;
                    crits.remove();
                }
            }
           
            //degrade the join if there is no criteria left
            if (criteria.isEmpty() && joinType == JoinType.JOIN_INNER) {
View Full Code Here

     * @param expression
     * @return
     * @since 4.2
     */
    private static boolean containsFunctionsThatCannotBePushed(Expression expression) {
        Iterator functions = FunctionCollectorVisitor.getFunctions(expression, true).iterator();
        while (functions.hasNext()) {
            Function function = (Function)functions.next();
            if (function.getFunctionDescriptor().getPushdown() == PushDown.CANNOT_PUSHDOWN) {
                return true;
            }
        }
        return false;
View Full Code Here

                    "Wrong QName for this configuration factory " + definitions.getQName());
        }
        SynapseConfiguration config = SynapseConfigUtils.newConfiguration();              
        config.setDefaultQName(definitions.getQName());

        Iterator itr = definitions.getChildren();
        while (itr.hasNext()) {
            Object o = itr.next();
            if (o instanceof OMElement) {
                OMElement elt = (OMElement) o;
                if (XMLConfigConstants.SEQUENCE_ELT.equals(elt.getQName())) {
                    String key = elt.getAttributeValue(
                            new QName(XMLConfigConstants.NULL_NAMESPACE, "key"));
View Full Code Here

     *
     * @param locale    locale to set
     */
    public void setLocale(Locale locale) {       
        parser.setLocale(locale); // might be user supplied
        Iterator i = parsers.iterator();
        while (i.hasNext()) {
            FTPFileParser p = (FTPFileParser)i.next();
            p.setLocale(locale);
        }
    }
View Full Code Here

    /**
     * Reinitialize the parsers
     */
    private void reinitializeParsers() {       
        parser.setIgnoreDateParseErrors(false);
        Iterator i = parsers.iterator();
        while (i.hasNext()) {
            FTPFileParser p = (FTPFileParser)i.next();
            p.setIgnoreDateParseErrors(false);
        }
    }
View Full Code Here

        if (parser.isValidFormat(files)) {
            log.debug("Confirmed format " + parser.toString());
            parserDetected = true;
            return;
        }  
        Iterator i = parsers.iterator();
        while (i.hasNext()) {
            FTPFileParser p = (FTPFileParser)i.next();
            if (p.isValidFormat(files)) {
                parser = p;
                log.debug("Detected format " + parser.toString());
                parserDetected = true;
                return;
View Full Code Here

 
  /**
   * notfies all listener of the change
   */
  public void notifyListener() {
    Iterator                iter;
   
    iter = m_ChangeListeners.iterator();
    while (iter.hasNext())
      ((ChangeListener) iter.next()).stateChanged(new ChangeEvent(this));
  }
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.