/** * Constructs a new immutable map with the same mappings as the specified {@code map}. * * * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newImmutableMap( * Map) newImmutableMap(map)}. * * @param map the map whose mappings are to be placed in the returned map * * @return a new immutable map with the same mappings as the specified {@code map} */ @Nonnull public static HashCharLongMap newImmutableMap( @Nonnull Map<Character, Long> map) { return getDefaultFactory().newImmutableMap(map); }
/** * Constructs a new immutable map of the single specified mapping. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newImmutableMapOf(char, long * ) newImmutableMapOf(k1, v1)}. * * @param k1 the key of the sole mapping * @param v1 the value of the sole mapping * @return a new immutable map of the single specified mapping */ @Nonnull public static HashCharLongMap newImmutableMapOf( char k1, long v1) { return getDefaultFactory().newImmutableMapOf(k1, v1); }
/** * Constructs a new empty mutable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newMutableMap() newMutableMap()}. * * @return a new empty mutable map */ @Nonnull public static HashCharLongMap newMutableMap() { return getDefaultFactory().newMutableMap(); }
/** * Constructs a new empty updatable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newUpdatableMap() newUpdatableMap()}. * * @return a new empty updatable map */ @Nonnull public static HashCharLongMap newUpdatableMap() { return getDefaultFactory().newUpdatableMap(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashCharLongMapFactory) { HashCharLongMapFactory factory = (HashCharLongMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Long) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new mutable map of the single specified mapping. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newMutableMapOf(char, long * ) newMutableMapOf(k1, v1)}. * * @param k1 the key of the sole mapping * @param v1 the value of the sole mapping * @return a new mutable map of the single specified mapping */ @Nonnull public static HashCharLongMap newMutableMapOf( char k1, long v1) { return getDefaultFactory().newMutableMapOf(k1, v1); }
/** * Constructs a new updatable map of the single specified mapping. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newUpdatableMapOf(char, long * ) newUpdatableMapOf(k1, v1)}. * * @param k1 the key of the sole mapping * @param v1 the value of the sole mapping * @return a new updatable map of the single specified mapping */ @Nonnull public static HashCharLongMap newUpdatableMapOf( char k1, long v1) { return getDefaultFactory().newUpdatableMapOf(k1, v1); }
/** * Constructs a new empty updatable map of the given expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newUpdatableMap(int) newUpdatableMap(expectedSize)}. * * @param expectedSize the expected size of the returned map * @return a new empty updatable map of the given expected size */ @Nonnull public static HashCharLongMap newUpdatableMap(int expectedSize) { return getDefaultFactory().newUpdatableMap(expectedSize); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashCharLongMapFactory) { HashCharLongMapFactory factory = (HashCharLongMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Long) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new mutable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newMutableMapOf(char, long, * char, long) newMutableMapOf(k1, v1, k2, v2)}. * * @param k1 the key of the first mapping * @param v1 the value of the first mapping * @param k2 the key of the second mapping * @param v2 the value of the second mapping * @return a new mutable map of the two specified mappings */ @Nonnull public static HashCharLongMap newMutableMapOf( char k1, long v1, char k2, long v2) { return getDefaultFactory().newMutableMapOf(k1, v1, k2, v2); }
/** * Constructs a new updatable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newUpdatableMapOf(char, long, * char, long) newUpdatableMapOf(k1, v1, k2, v2)}. * * @param k1 the key of the first mapping * @param v1 the value of the first mapping * @param k2 the key of the second mapping * @param v2 the value of the second mapping * @return a new updatable map of the two specified mappings */ @Nonnull public static HashCharLongMap newUpdatableMapOf( char k1, long v1, char k2, long v2) { return getDefaultFactory().newUpdatableMapOf(k1, v1, k2, v2); }
/** * Constructs a new empty mutable map of the given expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newMutableMap(int) newMutableMap(expectedSize)}. * * @param expectedSize the expected size of the returned map * @return a new empty mutable map of the given expected size */ @Nonnull public static HashCharLongMap newMutableMap(int expectedSize) { return getDefaultFactory().newMutableMap(expectedSize); }
/** * Constructs a new updatable map with the same mappings as the specified {@code map}. * * * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newUpdatableMap( * Map) newUpdatableMap(map)}. * * @param map the map whose mappings are to be placed in the returned map * * @return a new updatable map with the same mappings as the specified {@code map} */ @Nonnull public static HashCharLongMap newUpdatableMap( @Nonnull Map<Character, Long> map) { return getDefaultFactory().newUpdatableMap(map); }
/** * Constructs a new immutable map which merge the mappings of the specified maps. On conflict, * mappings from the maps passed later in the argument list have priority over mappings * from the maps passed earlier with the same keys. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newImmutableMap(Map, Map, * Map, Map, int) newImmutableMap(map1, map2, map3, map4, expectedSize)}. * * @param map1 the first map to merge * @param map2 the second map to merge * @param map3 the third map to merge * @param map4 the fourth map to merge * @param expectedSize the expected size of the returned map * @return a new immutable map which merge the mappings of the specified maps */ @Nonnull public static HashCharLongMap newImmutableMap( @Nonnull Map<Character, Long> map1, @Nonnull Map<Character, Long> map2, @Nonnull Map<Character, Long> map3, @Nonnull Map<Character, Long> map4, int expectedSize) { return getDefaultFactory().newImmutableMap(map1, map2, map3, map4, expectedSize); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashCharLongMapFactory) { HashCharLongMapFactory factory = (HashCharLongMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Long) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new immutable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newImmutableMapOf(char, long, * char, long) newImmutableMapOf(k1, v1, k2, v2)}. * * @param k1 the key of the first mapping * @param v1 the value of the first mapping * @param k2 the key of the second mapping * @param v2 the value of the second mapping * @return a new immutable map of the two specified mappings */ @Nonnull public static HashCharLongMap newImmutableMapOf( char k1, long v1, char k2, long v2) { return getDefaultFactory().newImmutableMapOf(k1, v1, k2, v2); }
/** * Constructs a new mutable map of the four specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newMutableMapOf(char, long, * char, long, char, long, char, long * ) newMutableMapOf(k1, v1, k2, v2, k3, v3, k4, v4)}. * * @param k1 the key of the first mapping * @param v1 the value of the first mapping * @param k2 the key of the second mapping * @param v2 the value of the second mapping * @param k3 the key of the third mapping * @param v3 the value of the third mapping * @param k4 the key of the fourth mapping * @param v4 the value of the fourth mapping * @return a new mutable map of the four specified mappings */ @Nonnull public static HashCharLongMap newMutableMapOf( char k1, long v1, char k2, long v2, char k3, long v3, char k4, long v4) { return getDefaultFactory().newMutableMapOf(k1, v1, k2, v2, k3, v3, k4, v4); }
/** * Constructs a new updatable map of the three specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newUpdatableMapOf(char, long, * char, long, char, long) newUpdatableMapOf(k1, v1, k2, v2, * k3, v3)}. * * @param k1 the key of the first mapping * @param v1 the value of the first mapping * @param k2 the key of the second mapping * @param v2 the value of the second mapping * @param k3 the key of the third mapping * @param v3 the value of the third mapping * @return a new updatable map of the three specified mappings */ @Nonnull public static HashCharLongMap newUpdatableMapOf( char k1, long v1, char k2, long v2, char k3, long v3) { return getDefaultFactory().newUpdatableMapOf(k1, v1, k2, v2, k3, v3); }
/** * Constructs a new mutable map with the given mappings, i. e. pairs of elements from * the {@code keys} and {@code values} arrays at the same index. If {@code keys} array have * duplicate elements, value corresponding the key with the highest index is left * in the returned map. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newMutableMap(Character[], * Long[]) newMutableMap(keys, values)}. * * @param keys the keys of the returned map * @param values the values of the returned map, each value is associated with the element * of the {@code keys} array at the same index * * @return a new mutable map with the given mappings * @throws IllegalArgumentException if {@code keys} and {@code values} arrays have different * length */ @Nonnull public static HashCharLongMap newMutableMap( @Nonnull Character[] keys, @Nonnull Long[] values) { return getDefaultFactory().newMutableMap(keys, values); }
/** * Constructs a new updatable map which merge the mappings of the specified maps. On conflict, * mappings from the {@code map2} have priority over mappings from the {@code map1} with * the same keys. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharLongMapFactory#newUpdatableMap(Map, * Map, int) newUpdatableMap(map1, map2, expectedSize)}. * * @param map1 the first map to merge * @param map2 the second map to merge * @param expectedSize the expected size of the returned map * @return a new updatable map which merge the mappings of the specified maps */ @Nonnull public static HashCharLongMap newUpdatableMap( @Nonnull Map<Character, Long> map1, @Nonnull Map<Character, Long> map2, int expectedSize) { return getDefaultFactory().newUpdatableMap(map1, map2, expectedSize); }