@Override public int size() { return map.size(); } }
/** * Get the amount of players online on this world * * @return amount of players online on this world */ public int getAmountOfPlayers() { return players.size(); }
@Override public int getSize() { return _map.size(); }
/** * Creates a new empty array map copying the entries of a given map. * * @param m * a map. */ public Object2ObjectArrayMap(final Object2ObjectMap<K, V> m) { this(m.size()); putAll(m); } /**
/** * Creates a new hash map copying a given type-specific one. * * @param m * a type-specific map to be copied into the new hash map. * @param f * the load factor. */ public Object2ObjectLinkedOpenHashMap(final Object2ObjectMap<K, V> m, final float f) { this(m.size(), f); putAll(m); } /**
/** * Creates a new hash map copying a given type-specific one. * * @param m * a type-specific map to be copied into the new hash map. * @param f * the load factor. */ public Object2ObjectOpenHashMap(final Object2ObjectMap<K, V> m, final float f) { this(m.size(), f); putAll(m); } /**
/** * Creates a new hash map copying a given type-specific one. * * @param m * a type-specific map to be copied into the new hash map. * @param f * the load factor. * @param strategy * the strategy. */ public Object2ObjectOpenCustomHashMap(final Object2ObjectMap<K, V> m, final float f, final Strategy<? super K> strategy) { this(m.size(), f, strategy); putAll(m); } /**
/** * Creates a new hash map copying a given type-specific one. * * @param m * a type-specific map to be copied into the new hash map. * @param f * the load factor. * @param strategy * the strategy. */ public Object2ObjectLinkedOpenCustomHashMap(final Object2ObjectMap<K, V> m, final float f, final Strategy<? super K> strategy) { this(m.size(), f, strategy); putAll(m); } /**
private static Object2ObjectLinkedOpenHashMap<String, String> invert( Object2ObjectMap<String, String> m ) { final Object2ObjectLinkedOpenHashMap<String, String> result = new Object2ObjectLinkedOpenHashMap<String, String>(); for( Map.Entry<String, String> e : m.entrySet() ) result.put( e.getValue(), e.getKey() ); if ( m.size() != result.size() ) throw new IllegalArgumentException( "Index remapping " + m + " is not a bijection" ); return result; }
private static Object2ObjectLinkedOpenHashMap<String, String> invert( Object2ObjectMap<String, String> m ) { final Object2ObjectLinkedOpenHashMap<String, String> result = new Object2ObjectLinkedOpenHashMap<String, String>(); for( Map.Entry<String, String> e : m.entrySet() ) result.put( e.getValue(), e.getKey() ); if ( m.size() != result.size() ) throw new IllegalArgumentException( "Index remapping " + m + " is not a bijection" ); return result; }
private static Object2ObjectLinkedOpenHashMap<String, String> invert( Object2ObjectMap<String, String> m ) { final Object2ObjectLinkedOpenHashMap<String, String> result = new Object2ObjectLinkedOpenHashMap<String, String>(); for( Map.Entry<String, String> e : m.entrySet() ) result.put( e.getValue(), e.getKey() ); if ( m.size() != result.size() ) throw new IllegalArgumentException( "Index remapping " + m + " is not a bijection" ); return result; }
private static Object2ObjectLinkedOpenHashMap<String, String> invert( Object2ObjectMap<String, String> m ) { final Object2ObjectLinkedOpenHashMap<String, String> result = new Object2ObjectLinkedOpenHashMap<String, String>(); for( Map.Entry<String, String> e : m.entrySet() ) result.put( e.getValue(), e.getKey() ); if ( m.size() != result.size() ) throw new IllegalArgumentException( "Index remapping " + m + " is not a bijection" ); return result; }