Package java.util

Examples of java.util.Set.clear()


            } else {
              // Do not send following messages to this server
              servers.add(server);
            }
          }
          servers.clear();
        }
      } catch (Exception exc) {
        this.logmon.log(BasicLevel.FATAL,
                        this.getName() + ", unrecoverable exception", exc);
        //  There is an unrecoverable exception during the transaction
View Full Code Here


      map.clear();
    map.put("1", "1");
    map.put("2", "1");
    map.put("3", "1");
    Set set = map.keySet();
    set.clear();
    assertEquals(true, map.isEmpty());
    }

    final public void testContains() {
      map.clear();
View Full Code Here

            catch (XmlBlasterException e) {
               log.warning("Unsubscribe failed: " + e.getMessage());
            }
         }

         subscriptions.clear();
      }
   }

   /**
    * Callback from xmlBlaster core
View Full Code Here

         Set listenerSet = (Set)o;
         if (l != null) {
            listenerSet.remove(l);
         }
         else {
            listenerSet.clear();
         }
         if ( listenerSet.size() < 1 ) {
            changeListenerMap.remove(key);
         }
      }
View Full Code Here

      {
         lock.readLock().lock();
         try
         {
            Set state = getCurrentState(true);
            state.clear();
         }
         finally
         {
            lock.readLock().unlock();
         }
View Full Code Here

        Set usedApplicationData = new LinkedHashSet();
        List methods = new ArrayList();
        List invokers = new ArrayList();
        for ( int i = 0; i < components.length; i++ )
        {
            usedApplicationData.clear();
            component = (SemanticRule) components[i];
            if ( component instanceof Condition )
            {
                condition = (SemanticCondition) component;
                StringBuffer conditionBuffer = methodGenerator.generateMethod( condition.getName(),
View Full Code Here

                        s.OnConnect();
                    }
                }
               
            } // while
            keys.clear();
           
            // deregister
            it = m_selector.keys().iterator();
            boolean bRemoved = false;
            while (it.hasNext())
View Full Code Here

      boolean first = seen.isEmpty();
      try {
        seen.add(here);
        return fields.equals(((RecordSchema)o).fields);
      } finally {
        if (first) seen.clear();
      }
    }
    @Override int computeHash() {
      Map seen = SEEN_HASHCODE.get();
      if (seen.containsKey(this)) return 0;       // prevent stack overflow
View Full Code Here

    assertTrue("document.getFields() Size: " + document.getFields().size() + " is not: " + 1, document.getFields().size() == 1);
    String value = document.get("contents");
    assertTrue("value is not null and it should be", value == null);
    value = document.get("other");
    assertTrue("value is null and it shouldn't be", value != null);
    ftl.clear();
    ftl.add("contents");
    fs = new SetBasedFieldSelector(ftl, Collections.EMPTY_SET);
    document = searcher.doc(hits[1].doc, fs);
    value = document.get("contents");
    assertTrue("value is null and it shouldn't be", value != null);   
View Full Code Here

    searcher.search(query, c);
    Assert.assertEquals("Simple: " + query.toString(defaultFieldName),
                        correct, actual);

    for (int i = -1; i < 2; i++) {
      actual.clear();
      QueryUtils.wrapSearcher(searcher, i).search(query, c);
      Assert.assertEquals("Wrap Searcher " + i + ": " +
                          query.toString(defaultFieldName),
                          correct, actual);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.