Package gnu.trove.map.hash

Examples of gnu.trove.map.hash.THashMap$ValueView


    @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
    public void testTPHashMapConstructors() {

        int cap = 20;

        THashMap cap_and_factor = new THashMap( cap, 0.75f );
        assertTrue( "capacity not sufficient: " + cap + ", " + cap_and_factor.capacity(),
                cap <= cap_and_factor.capacity() );
        assertEquals( 0.75f, cap_and_factor._loadFactor );
    }
View Full Code Here


    return itemRenders.containsKey(ItemWrapper.fromItemStack(stack));
  }

  public static void refreshMap() {

    Map<ItemWrapper, IItemRenderer> tempMap = new THashMap(itemRenders.size());

    for (Entry<ItemWrapper, IItemRenderer> entry : itemRenders.entrySet()) {
      ItemWrapper tempItem = new ItemWrapper(entry.getKey().item, entry.getKey().metadata);
      tempMap.put(tempItem, entry.getValue());
    }
    itemRenders.clear();
    itemRenders = tempMap;
  }
View Full Code Here

TOP

Related Classes of gnu.trove.map.hash.THashMap$ValueView

Copyright © 2018 www.massapicom. 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.