Package java.util

Examples of java.util.Set.clear()


            Method[] methods = next.getMethods();

            // Comparison is based on method names only.  First collect
            // all methods from current interface, eliminating duplicate
            // names.
            currentMethodNames.clear();
            for(int m = 0; m < methods.length; m++) {
                currentMethodNames.add(methods[m].getName());
            }

            // Now check each method against list of all unique method
View Full Code Here


            }

            while (rs.next()) {
                fieldIndex = 1;
                columnIndex = ids.length + 1;
                processedTables.clear();
                if (fields[0].isJoined()) {
                    ClassDescriptor clsDesc = _engine.getDescriptor();
                    processedTables.add(new ClassDescriptorJDONature(clsDesc).getTableName());
                }
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

    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();

        assertNotSame(s, s1);
View Full Code Here

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

     * @param lc The lastConfiguration to set.
     */
    public void setLastConfiguration(final History history,
            final Set lc) {
        Set lastConfiguration = getLastConfiguration(history);
        lastConfiguration.clear();
        lastConfiguration.addAll(lc);
    }

    /**
     * Check whether we have prior history.
View Full Code Here

     * @see org.apache.commons.scxml.SCXMLExecutor#reset()
     */
    public void reset(final History history) {
        Set lastConfiguration = (Set) histories.get(history);
        if (lastConfiguration != null) {
            lastConfiguration.clear();
        }
    }

    /**
     * Get the {@link SCXMLExecutor} this instance is attached to.
View Full Code Here

                        "Multiple OR states active for state "
                        + tt.getId(), entry);
                    legalConfig = false;
                }
            }
            count.clear(); //cleanup
        }
        if (scxmlCount.size() > 1) {
            errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
                    "Multiple top-level OR states active!", scxmlCount);
        }
View Full Code Here

        tmp = tt2;
        while ((tmp = tmp.getParent()) != null) {
            if (tmp instanceof State) {
                //test redundant add = common ancestor
                if (!parents.add(tmp)) {
                    parents.clear();
                    return tmp;
                }
            }
        }
        return null;
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.