Package java.util

Examples of java.util.WeakHashMap.keySet()


    AbstractMap map6 = new TreeMap();
    assertSame("TreeMap", map6.keySet(), map6.keySet());

    AbstractMap map7 = new WeakHashMap();
    assertSame("WeakHashMap", map7.keySet(), map7.keySet());
  }

  /**
   * @tests java.util.AbstractMap#remove(java.lang.Object)
   */
 
View Full Code Here


    AbstractMap map6 = new TreeMap();
    assertSame("TreeMap", map6.keySet(), map6.keySet());

    AbstractMap map7 = new WeakHashMap();
    assertSame("WeakHashMap", map7.keySet(), map7.keySet());
  }

  /**
   * @tests java.util.AbstractMap#remove(java.lang.Object)
   */
 
View Full Code Here

        WeakHashMap map = new WeakHashMap();
        ConstantHashClass cl = new ConstantHashClass(2);
        map.put(new ConstantHashClass(1), null);
        map.put(cl, null);
        map.put(new ConstantHashClass(3), null);
        Iterator iter = map.keySet().iterator();
        iter.next();
        iter.next();
        System.gc();
        assertFalse("Wrong hasNext() value", iter.hasNext());
    }
View Full Code Here

    AbstractMap map6 = new TreeMap();
    assertSame("TreeMap", map6.keySet(), map6.keySet());

    AbstractMap map7 = new WeakHashMap();
    assertSame("WeakHashMap", map7.keySet(), map7.keySet());
  }

  /**
   * @tests java.util.AbstractMap#remove(java.lang.Object)
   */
 
View Full Code Here

    AbstractMap map6 = new TreeMap();
    assertSame("TreeMap", map6.keySet(), map6.keySet());

    AbstractMap map7 = new WeakHashMap();
    assertSame("WeakHashMap", map7.keySet(), map7.keySet());
  }

  /**
   * @tests java.util.AbstractMap#remove(java.lang.Object)
   */
 
View Full Code Here

        {
            return null;
        }

        // seek for an open broker, preferably in transaction
        for(Iterator it = set.keySet().iterator(); it.hasNext();)
        {
            PersistenceBrokerInternal tmp = (PersistenceBrokerInternal) it.next();
            if(tmp == null || tmp.isClosed())
            {
                it.remove();
View Full Code Here

     * Remove all of this Service's serviceObjects from it known sessions
     */
    public void clearSessions() {
      WeakHashMap map = (WeakHashMap) sessions.get( this.getName() );
      if ( map == null ) return ;
      Iterator iter = map.keySet().iterator();
      while ( iter.hasNext() ) {
        Session session = (Session) iter.next();
        session.remove( this.getName() );
      }
    }
View Full Code Here

        AbstractMap map6 = new TreeMap();
        assertSame("TreeMap", map6.keySet(), map6.keySet());

        AbstractMap map7 = new WeakHashMap();
        assertSame("WeakHashMap", map7.keySet(), map7.keySet());
    }

    /**
     * @tests java.util.AbstractMap#remove(java.lang.Object)
     */
 
View Full Code Here

        AbstractMap map6 = new TreeMap();
        assertSame("TreeMap", map6.keySet(), map6.keySet());

        AbstractMap map7 = new WeakHashMap();
        assertSame("WeakHashMap", map7.keySet(), map7.keySet());
    }

    /**
     * @tests java.util.AbstractMap#remove(java.lang.Object)
     */
 
View Full Code Here

        WeakHashMap map = new WeakHashMap();
        ConstantHashClass cl = new ConstantHashClass(2);
        map.put(new ConstantHashClass(1), null);
        map.put(cl, null);
        map.put(new ConstantHashClass(3), null);
        Iterator iter = map.keySet().iterator();
        iter.next();
        iter.next();
        System.gc();
        assertFalse("Wrong hasNext() value", iter.hasNext());
    }
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.