Package java.util

Examples of java.util.Set.clear()


      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


      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

        // lets add all the available class loaders just in case of weirdness
        // we could make this more strict once we've worked out all the gremlins
        // in servicemix-camel
        Set set = resolver.getClassLoaders();
        set.clear();
        set.add(classLoader);
/*
        set.add(classLoader);
        set.add(applicationContext.getClassLoader());
        set.add(getClass().getClassLoader());
View Full Code Here

      root.addChild(Fqn.fromElements(childName));
      Set childrenDirect = root.getChildrenDirect();

      try
      {
         childrenDirect.clear();
         fail("getChildrenDirect() should return an unmodifiable collection object");
      }
      catch (UnsupportedOperationException uoe)
      {
         // good; should be immutable
View Full Code Here

        this.resolver = resolverUtil;
        // lets add all the available class loaders just in case of weirdness
        // we could make this more strict once we've worked out all the gremlins
        // in servicemix-camel
        Set set = resolver.getClassLoaders();
        set.clear();
        set.add(classLoader);
/*
        set.add(classLoader);
        set.add(applicationContext.getClassLoader());
        set.add(getClass().getClassLoader());
View Full Code Here

    }

    public void clear() {
        Set resolved = resolvedObjectSet();
        postprocessRemove(resolved);
        resolved.clear();
    }

    public boolean contains(Object o) {
        return resolvedObjectSet().contains(o);
    }
View Full Code Here

    public final void testEntrySet() {
        p.put("MessageDigest.SHA-256", "aaa.bbb.ccc.ddd");
       
        Set s = p.entrySet();
        try {
            s.clear();
            fail("Must return unmodifiable set");
        } catch (UnsupportedOperationException e) {
        }

        assertEquals("Incorrect set size", 8, s.size());
View Full Code Here

    public final void testKeySet() {
        p.put("MessageDigest.SHA-256", "aaa.bbb.ccc.ddd");
       
        Set s = p.keySet();
        try {
            s.clear();
        } catch (UnsupportedOperationException e) {
        }
        Set s1 = p.keySet();
        if ((s == s1) || s1.isEmpty() ) {
            fail("Must return unmodifiable set");
View Full Code Here

        int lastSafeVolatileCommit = -1;
        Set transactionIds = new HashSet();
        for (int i = 0; i < actions.size(); i++) {
            MultiIndex.Action a = (MultiIndex.Action) actions.get(i);
            if (a.getType() == MultiIndex.Action.TYPE_COMMIT) {
                transactionIds.clear();
            } else if (a.getType() == MultiIndex.Action.TYPE_VOLATILE_COMMIT) {
                transactionIds.retainAll(losers);
                // check if transactionIds contains losers
                if (transactionIds.size() > 0) {
                    // found dirty volatile commit
View Full Code Here

        if (thisPrincipals == null || thisCredentials == null
                || thisPrincipals.isEmpty() || thisCredentials.isEmpty()) {
            return false;
        } else {
            thisPrincipals.clear();
            thisCredentials.clear();
            return true;
        }
    }

    /**
 
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.