Package java.util

Examples of java.util.Map.clear()


            }
        }

        if (cache != null) {
            synchronized (cache) {
                cache.clear();
            }
        }
    }
}
View Full Code Here


            fail("Should have caught ClassCastException");
        } catch (ClassCastException ignored) {}

        // reject non-Comparable keys
        m2.clear();
        m2.put("1", "foo");
        m2.put(new Object(), "bad key");

        try {
            m = new DoubleOrderedMap(m2);
View Full Code Here

        for (int k = 0; k < nodes.length; k++) {
            assertTrue(m.containsKey(nodes[k].getKey()));
            assertTrue(m.containsValue(nodes[k].getValue()));
        }

        m.clear();
        assertTrue(m.isEmpty());

        for (int k = 0; k < nodes.length; k++) {
            assertTrue(!m.containsKey(nodes[k].getKey()));
            assertTrue(!m.containsValue(nodes[k].getValue()));
View Full Code Here

                    usedLabelNames.put( labels[ i ].toString(), labels[ i ] );
                }
            }
        }
        usedLabelNames.clear();

        ts.parse();
        myUnion.addImportedName( ts.typeName() );

    }
View Full Code Here

      while( iter.hasNext() )
      {
         TimedEntry entry = (TimedEntry) iter.next();
         entry.destroy();
      }
      tmpMap.clear();
   }

   public int size()
   {
      return entryMap.size();
View Full Code Here

      while( iter.hasNext() )
      {
         TimedEntry entry = (TimedEntry) iter.next();
         entry.destroy();
      }
      tmpMap.clear();
   }

   public int size()
   {
      return entryMap.size();
View Full Code Here

    }

    public void clear() {
        Map m = (Map) backup.get();
        if (m != null) {
            m.clear();
        }
    }

    protected HttpSession getSession() {
        RequestContext reqCtx = RequestContext.lookup();
View Full Code Here

            }
        }

        if (cache != null) {
            synchronized (cache) {
                cache.clear();
            }
        }
    }

    protected void finalize() throws Throwable {
View Full Code Here

            }
        }

        if (cache != null) {
            synchronized (cache) {
                cache.clear();
            }
        }
    }
    protected void finalize(){
        ClassLoaderRegistry.remove(this);
View Full Code Here

      boolean first = seen.isEmpty();
      try {
        seen.put(this, this);
        return super.computeHash() + fields.hashCode();
      } finally {
        if (first) seen.clear();
      }
    }
    void toJson(Names names, JsonGenerator gen) throws IOException {
      if (writeNameRef(names, gen)) return;
      String savedSpace = names.space;            // save namespace
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.