Package java.util

Examples of java.util.LinkedList$ListItr


      Map tempMetadata = command.getTemporaryMetadata();
      final TempMetadataStore metadataStore = new TempMetadataStore(tempMetadata);
           
            if (dynamicCommand.getUsing() != null
                            && !dynamicCommand.getUsing().isEmpty()) {
                metadataStore.addTempGroup(Reserved.USING, new LinkedList(dynamicCommand.getUsing().getClauseMap().keySet()));
                GroupSymbol using = new GroupSymbol(Reserved.USING);
                using.setMetadataID(metadataStore.getTempGroupID(Reserved.USING));
                command.addExternalGroupToContext(using);
                metadataStore.addTempGroup(ProcedureReservedWords.DVARS, new LinkedList(dynamicCommand.getUsing().getClauseMap().keySet()));
                using = new GroupSymbol(ProcedureReservedWords.DVARS);
                using.setMetadataID(metadataStore.getTempGroupID(ProcedureReservedWords.DVARS));
                command.addExternalGroupToContext(using);
            }
View Full Code Here


    this.result = content;
    operationResult.setSimpleResult(content);
  }

  private void init() {
    fieldNameList = new LinkedList();

    Iterator operationsIter = operationDefinitionSet.iterator();

    while (operationsIter.hasNext()) {
      OperationDefinition opDef = (OperationDefinition) operationsIter
View Full Code Here

     * @return the List containing quers.
     * @exception JDOMException if there is an error consuming the message.
     */
    public List parseXMLQueryFile(String queryScenarioID, File queryFile, String querySetID) throws IOException, JDOMException {

  List<QueryTest> queries = new LinkedList();
//        HashMap queryMap = new HashMap();
        SAXBuilder builder = SAXBuilderHelper.createSAXBuilder(false);
        Document queryDocument = builder.build(queryFile);
        List queryElements = queryDocument.getRootElement().getChildren(TagNames.Elements.QUERY);
        Iterator iter = queryElements.iterator();
        while ( iter.hasNext() ) {
            Element queryElement = (Element) iter.next();
            String queryName = queryElement.getAttributeValue(TagNames.Attributes.NAME);
            if ( queryElement.getChild(TagNames.Elements.EXCEPTION) == null ) {
          String uniqueID = querySetID + "_" + queryName;
         
    List<Element> parmChildren = queryElement.getChildren(TagNames.Elements.SQL);
         
    if (parmChildren == null || parmChildren.isEmpty()) {
              TestLogger.logDebug("=======  Single QueryTest ");
              QuerySQL sql = createQuerySQL(queryElement);
              
              QueryTest q = new QueryTest(queryScenarioID, uniqueID, querySetID, new QuerySQL[] {sql}, false);
              queries.add(q);
          } else {
              TestLogger.logDebug("=======  QueryTest has multiple sql statements");
             QuerySQL[] querysql = new QuerySQL[parmChildren.size()];
            int c = 0;
           
            final Iterator<Element> sqliter = parmChildren.iterator();
            while ( sqliter.hasNext() ) {
              final Element sqlElement = (Element) sqliter.next();
              QuerySQL sql = createQuerySQL(sqlElement);
              querysql[c] = sql;
              c++; 
            }
            QueryTest q = new QueryTest(queryScenarioID, uniqueID, querySetID, querysql, false);
            queries.add(q);
                  
           
            
          }
//               queryMap.put(queryName, query);
            } else {
                Element exceptionElement = queryElement.getChild(TagNames.Elements.EXCEPTION);
                String exceptionType = exceptionElement.getChild(TagNames.Elements.CLASS).getTextTrim();
               
                String uniqueID = querySetID + "_" + queryName;
                QuerySQL sql = new QuerySQL(exceptionType, null);
               
                QueryTest q = new QueryTest(queryScenarioID, uniqueID, querySetID, new QuerySQL[] {sql}, true);
                queries.add(q);

               
//               queryMap.put(queryName, exceptionType);
            }
        }
View Full Code Here

  public void setContent(String content) {
    this.content = content;
  }

  private void init() {
    fieldNameList = new LinkedList();

    PropertyDefinition listPropDefinition = (PropertyDefinition) propertDefinitions
        .get(LISTNAME);

    PropertyDefinition propertyDefinitionMap = ((PropertyDefinitionList) listPropDefinition)
View Full Code Here

*/
public class CollectionUtilsTest extends AbstractDozerTest {

  @Test
  public void testIsList() throws Exception {
    Object[] values = new Object[] { new ArrayList(), new Vector(), new LinkedList() };
    for (int i = 0; i < values.length; i++) {
      assertTrue(CollectionUtils.isList(values[i].getClass()));
    }
  }
View Full Code Here

  public QSAdminGUI getGUI(){
    return gui;
  }

  public void startSocketListener() {
    receivedMsg = new LinkedList();
    Thread t = new Thread() {
      public void run() {
        String rec = null;
        logger.info("Started");
        while(true) {
View Full Code Here

        return null;
    }

    public List getItemsForOMGraphicMenu(OMGraphic omg) {
        Debug.output("getMenuFor(" + omg.getClass().getName() + ")");
        List list = new LinkedList();
        list.add(new JMenuItem(omg.getClass().getName()));
        return list;
    }
View Full Code Here

//        } else { //permit to add multi-locks on same lock for same identity
//            Lock tmpLock = (Lock)treeid2lock.get(treeId);
//            if (tmpLock != lock)
//                throw new ChaiDBException(ErrorCode.ALERADY_EXIST_LOCK, "Already exit lock on this tree id");
//        }
        LinkedList locks = (LinkedList) treeid2lock.get(treeName);
        if (locks == null) {
            locks = new LinkedList();
            treeid2lock.put(treeName, locks);
        }
        locks.addFirst(lock);
    }
View Full Code Here

     *
     * @param treeName The tree id with which the lock list associate.
     * @return The lock list with which the tree id associates.
     */
    public Lock getLock(String treeName) throws ChaiDBException {
        LinkedList lock;
        if (treeid2lock.containsKey(treeName)) {
            lock = (LinkedList) treeid2lock.get(treeName);
            if (lock == null || lock.size() == 0)
                throw new ChaiDBException(ErrorCode.LOCK_NULL, "The lock is null in the entry which treeid is exist.");
            else {
                if (lock.size() == 1) {
                    removeLock(treeName);
                }
                return (Lock) lock.removeFirst();
            }
        } else {
            return null;
        }
    }
View Full Code Here

    try{
      this_mon.enter();
   
      DHTRouterNodeImpl  node = root;
     
      LinkedList  stack = new LinkedList();
     
      while( true ){
       
        List  buckets = node.getBuckets();
       
        if ( buckets == null ){
         
          if ( random.nextBoolean()){
           
            stack.add( node.getRight());

            node = node.getLeft();           
           
          }else{
           
            stack.add( node.getLeft());

            node = node.getRight();           
          }
        }else{
         
          int           max_fails       = 0;
          DHTRouterContactImpl  max_fails_contact  = null;
         
          for (int i=0;i<buckets.size();i++){
           
            DHTRouterContactImpl  contact = (DHTRouterContactImpl)buckets.get(i);

            if ( !contact.getPingOutstanding()){
             
              int  fails = contact.getFailCount();
             
              if ( fails > max_fails ){
               
                max_fails      = fails;
                max_fails_contact  = contact;
              }
            }
          }
         
          if ( max_fails_contact != null ){
                       
            requestPing( max_fails_contact );
           
            return;
          }
         
          if ( stack.size() == 0 ){
           
            break;
          }
         
          node = (DHTRouterNodeImpl)stack.removeLast();
        }
      }
    }finally{
     
      this_mon.exit();
View Full Code Here

TOP

Related Classes of java.util.LinkedList$ListItr

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.