Package java.util

Examples of java.util.Map.clear()


   
    //If we found both fields then try and clear the maps.
    if (this.recordMetricMapField != null && this.registryMetricMapField != null) {
      try {
        Map recordMap = (Map) this.recordMetricMapField.get(this.metricsRecord);
        recordMap.clear();
        Map registryMap = (Map) this.registryMetricMapField.get(this.registry);
        registryMap.clear();
      } catch (IllegalArgumentException e) {
        LOG.debug(UNABLE_TO_CLEAR);
      } catch (IllegalAccessException e) {
View Full Code Here


    if (this.recordMetricMapField != null && this.registryMetricMapField != null) {
      try {
        Map recordMap = (Map) this.recordMetricMapField.get(this.metricsRecord);
        recordMap.clear();
        Map registryMap = (Map) this.registryMetricMapField.get(this.registry);
        registryMap.clear();
      } catch (IllegalArgumentException e) {
        LOG.debug(UNABLE_TO_CLEAR);
      } catch (IllegalAccessException e) {
        LOG.debug(UNABLE_TO_CLEAR);
      }
View Full Code Here

            errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
                    "Multiple top-level OR states active!", scxmlCount);
        }
        //cleanup
        scxmlCount.clear();
        counts.clear();
        return legalConfig;
    }

    /**
     * Finds the least common ancestor of transition targets tt1 and tt2 if
View Full Code Here

    if (map != null) {
            Iterator it = map.keySet ().iterator ();
            while (it.hasNext()) {
                ((EngineLOB)it.next()).free();
      }
      map.clear();
    }
        if (rootConnection.lobHashMap != null) {
            rootConnection.lobHashMap.clear ();
        }
   
View Full Code Here

        map.put("akeyB", "newvalueB");
        assertEquals(4, map.size());
        assertEquals("newvalueB", (String) scontext.getAttribute("akeyB"));

        // Clearing the map
        map.clear();
        checkMapSize(map, 0);

    }

View Full Code Here

        // Transparency - entrySet()
        checkEntrySet(map, false);
        // Unsupported operations on read-only map
        try {
            map.clear();
            fail("Should have thrown UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            ; // expected result
        }
        try {
View Full Code Here

        // Transparency - entrySet()
        checkEntrySet(map, false);
        // Unsupported operations on read-only map
        try {
            map.clear();
            fail("Should have thrown UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            ; // expected result
        }
        try {
View Full Code Here

        // Transparency - entrySet()
        checkEntrySet(map, false);
        // Unsupported operations on read-only map
        try {
            map.clear();
            fail("Should have thrown UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            ; // expected result
        }
        try {
View Full Code Here

        checkEntrySet(map, false);

        // Unsupported operations on read-only map
        try {
            map.clear();
            fail("Should have thrown UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            ; // expected result
        }
        try {
View Full Code Here

        assertTrue(map.containsValue(values1));
        assertTrue(map.containsValue(values2));

        // Unsupported operations on read-only map
        try {
            map.clear();
            fail("Should have thrown UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            ; // expected result
        }
        try {
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.