Package java.util

Examples of java.util.HashSet.clear()


        }
        tmp = tt2;
        while ((tmp = tmp.getParent()) != null) {
            //test redundant add = common ancestor
            if (!parents.add(tmp)) {
                parents.clear();
                return tmp;
            }
        }
        return null;
    }
View Full Code Here


            }
            if ( minimal ) {
                floor.add( x );
            }

            subs.clear();
        }
        return floor;
    }

View Full Code Here

            }
            if ( minimal ) {
                floor.add( x );
            }

            subs.clear();
        }
        return floor;
    }

View Full Code Here

        }
        assertTrue("The set should have been empty, but instead contained: "
                   + s + ".",
                   s.isEmpty());

        s.clear();
        s.add("org.apache.ws.commons.schema.XmlSchemaGroup");
        XmlSchemaGroup xsg = null;
        for (Iterator i = t.getValues(); i.hasNext(); ) {
            xsg = (XmlSchemaGroup)i.next();
            s.remove(xsg.getClass().getName());
View Full Code Here

        assertEquals("priceGroup", xsg.getName());

        XmlSchemaChoice xsc = (XmlSchemaChoice)xsg.getParticle();
        assertNotNull(xsc);

        s.clear();
        s.add("fullPrice");
        s.add("salePrice");
        s.add("clearancePrice");
        s.add("freePrice");
        XmlSchemaObjectCollection items = xsc.getItems();
View Full Code Here

                   s.isEmpty());

        XmlSchemaObjectTable xsot = schema.getNotations();
        assertEquals(2, xsot.getCount());
       
        s.clear();
        s.add("teamMascot");
        s.add("teamLogo");
        for (Iterator i = xsot.getNames(); i.hasNext(); ) {
            String name = ((QName)i.next()).getLocalPart();
            if (!(name.equals("teamLogo")
View Full Code Here

        }
        assertTrue("The set should have been empty, but instead contained: "
                   + s + ".",
                   s.isEmpty());

        s.clear();
        s.add("teamMascot");
        s.add("teamLogo");
        for (Iterator i = xsot.getValues(); i.hasNext(); ) {
            XmlSchemaNotation xsn = (XmlSchemaNotation)i.next();
            String name = xsn.getName();
View Full Code Here

       
        XmlSchemaObjectCollection xsoc2 = xsscr.getFacets();
        assertNotNull(xsoc2);
        assertEquals(2, xsoc2.getCount());

        s.clear();
        s.add("small");
        s.add("medium");
        for (int i = 0; i < xsoc2.getCount(); i++) {
            XmlSchemaEnumerationFacet xsef =
                (XmlSchemaEnumerationFacet)xsoc2.getItem(i);
View Full Code Here

        resetFull();
        assertTrue("Full collection shouldn't contain other elements",
                   !collection.containsAll(col));
       
        col.clear();
        col.addAll(Arrays.asList(getFullElements()));
        assertTrue("Full collection should containAll full elements",
                   collection.containsAll(col));
        // make sure calls to "containsAll" don't change anything
        verify();
View Full Code Here

      assertTrue("scott password is echoman", isValid);
      HashSet testRole = new HashSet();
      testRole.add(new SimplePrincipal("Echo"));
      boolean hasRole = secMgr.doesUserHaveRole(domain, user, password, testRole);
      assertTrue("scott has Echo role", hasRole);
      testRole.clear();
      testRole.add(new SimplePrincipal("EchoLocal"));
      hasRole = secMgr.doesUserHaveRole(domain, user, password, testRole);
      assertTrue("scott has EchoLocal role", hasRole);
      testRole.clear();
      testRole.add(new SimplePrincipal("ProjectUser"));
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.