Package java.util

Examples of java.util.Collection.clear()


            selector.setSubjectAlternativeNames(sans);
            assertTrue("The certificate should match the selection criteria.",
                                                        selector.match(cert_1));
            assertFalse("The certificate should not match "
                        + "the selection criteria.",    selector.match(cert_2));
            sans.clear();
            assertTrue("The modification of initialization object "
                        + "should not affect the modification "
                        + "of internal object.",        selector.match(cert_1));
            selector.setSubjectAlternativeNames(sans_2.getPairsList());
            assertTrue("The certificate should match the selection criteria.",
View Full Code Here


        // clear values, reflected in map
        resetFull();
        Collection values = map.values();
        assertTrue(map.size() > 0);
        assertTrue(values.size() > 0);
        values.clear();
        assertTrue(map.size() == 0);
        assertTrue(values.size() == 0);
       
        // clear map, reflected in values
        resetFull();
View Full Code Here

        resetFull();
        assertEquals("Full sets should be equal", getSet(), getConfirmedSet());
        verify();

        set2.clear();
        set2.addAll(Arrays.asList(getOtherElements()));
        assertTrue("Sets with different contents shouldn't be equal",
                   !getSet().equals(set2));
    }
View Full Code Here

        conf.addProperty("testAddNodes.property(-1)[@name]", "prop2");
        conf.addProperty("testAddNodes.property(1).value", "value2");
        Collection nodes = new ArrayList();
        nodes.add(new HierarchicalConfiguration.Node("property"));
        conf.addNodes("testAddNodes", nodes);
        nodes.clear();
        ConfigurationNode nd = new HierarchicalConfiguration.Node("name",
                "prop3");
        nd.setAttribute(true);
        nodes.add(nd);
        conf.addNodes("testAddNodes.property(2)", nodes);
View Full Code Here

        // ensure that no two entries are equal using the equality method
        // of the element objects.  MailAddress objects test equality based
        // on equivalent but not necessarily visually identical addresses.
        Collection recipients = mail.getRecipients();
        // Wipe all the exist recipients
        recipients.clear();
        recipients.addAll(getHeaderMailAddresses(message, "Mail-For"));
        if (recipients.isEmpty()) {
            recipients.addAll(getHeaderMailAddresses(message, "To"));
            recipients.addAll(getHeaderMailAddresses(message, "Cc"));
        }
View Full Code Here

            if (debug) {
                logger.debug("Retaining elements: " + retainList);
            }

            collection.clear();
            collection.addAll(retainList);

            return filterTarget;
        }
View Full Code Here

    TypeSystemDescription tsd = typeSystemDescription;
    if (null != tsd) {
      tsd = (TypeSystemDescription) tsd.clone();
      tsd.setTypes(typeDescriptionArray0);
    }
    tsdc.clear();
    tsdc.add(tsd);
    importedTypeSystemDescription = CasCreationUtils
            .mergeTypeSystems(tsdc, createResourceManager());
  }
View Full Code Here

        Set pairs = super.entrySet();
        Iterator pairsIterator = pairs.iterator();
        while (pairsIterator.hasNext()) {
            Map.Entry keyValuePair = (Map.Entry) pairsIterator.next();
            Collection coll = (Collection) keyValuePair.getValue();
            coll.clear();
        }
        super.clear();
    }

    /**
 
View Full Code Here

        Collection coll = new ArrayList();
        coll.add(PredicateUtils.truePredicate());
        coll.add(PredicateUtils.truePredicate());
        coll.add(PredicateUtils.truePredicate());
        assertEquals(true, PredicateUtils.allPredicate(coll).evaluate(null));
        coll.clear();
        coll.add(PredicateUtils.truePredicate());
        coll.add(PredicateUtils.falsePredicate());
        coll.add(PredicateUtils.truePredicate());
        assertEquals(false, PredicateUtils.allPredicate(coll).evaluate(null));
        coll.clear();
View Full Code Here

        coll.clear();
        coll.add(PredicateUtils.truePredicate());
        coll.add(PredicateUtils.falsePredicate());
        coll.add(PredicateUtils.truePredicate());
        assertEquals(false, PredicateUtils.allPredicate(coll).evaluate(null));
        coll.clear();
        coll.add(PredicateUtils.falsePredicate());
        coll.add(PredicateUtils.falsePredicate());
        coll.add(PredicateUtils.truePredicate());
        assertEquals(false, PredicateUtils.allPredicate(coll).evaluate(null));
        coll.clear();
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.