/** * 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 HashByteShortMapFactory#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 HashByteShortMap newImmutableMap( @Nonnull Map<Byte, Short> 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 HashByteShortMapFactory#newImmutableMapOf(byte, short * ) 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 HashByteShortMap newImmutableMapOf( byte k1, short v1) { return getDefaultFactory().newImmutableMapOf(k1, v1); }
/** * Constructs a new empty mutable map of the given expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#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 HashByteShortMap newMutableMap(int expectedSize) { return getDefaultFactory().newMutableMap(expectedSize); }
/** * Constructs a new empty updatable map of the given expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#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 HashByteShortMap newUpdatableMap(int expectedSize) { return getDefaultFactory().newUpdatableMap(expectedSize); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteShortMapFactory) { HashByteShortMapFactory factory = (HashByteShortMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Short) 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 HashByteShortMapFactory#newMutableMapOf(byte, short * ) 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 HashByteShortMap newMutableMapOf( byte k1, short 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 HashByteShortMapFactory#newUpdatableMapOf(byte, short * ) 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 HashByteShortMap newUpdatableMapOf( byte k1, short v1) { return getDefaultFactory().newUpdatableMapOf(k1, v1); }
/** * Constructs a new empty updatable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#newUpdatableMap() newUpdatableMap()}. * * @return a new empty updatable map */ @Nonnull public static HashByteShortMap newUpdatableMap() { return getDefaultFactory().newUpdatableMap(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteShortMapFactory) { HashByteShortMapFactory factory = (HashByteShortMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Short) 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 HashByteShortMapFactory#newMutableMapOf(byte, short, * byte, short) 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 HashByteShortMap newMutableMapOf( byte k1, short v1, byte k2, short 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 HashByteShortMapFactory#newUpdatableMapOf(byte, short, * byte, short) 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 HashByteShortMap newUpdatableMapOf( byte k1, short v1, byte k2, short v2) { return getDefaultFactory().newUpdatableMapOf(k1, v1, k2, v2); }
/** * 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 HashByteShortMapFactory#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 HashByteShortMap newUpdatableMap( @Nonnull Map<Byte, Short> map) { return getDefaultFactory().newUpdatableMap(map); }
/** * Constructs a new empty mutable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#newMutableMap() newMutableMap()}. * * @return a new empty mutable map */ @Nonnull public static HashByteShortMap newMutableMap() { return getDefaultFactory().newMutableMap(); }
/** * Constructs a new immutable 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 HashByteShortMapFactory#newImmutableMap(Map, * Map, int) newImmutableMap(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 immutable map which merge the mappings of the specified maps */ @Nonnull public static HashByteShortMap newImmutableMap( @Nonnull Map<Byte, Short> map1, @Nonnull Map<Byte, Short> map2, int expectedSize) { return getDefaultFactory().newImmutableMap(map1, map2, expectedSize); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteShortMapFactory) { HashByteShortMapFactory factory = (HashByteShortMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Short) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new mutable map of the three specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#newMutableMapOf(byte, short, * byte, short, byte, short) newMutableMapOf(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 mutable map of the three specified mappings */ @Nonnull public static HashByteShortMap newMutableMapOf( byte k1, short v1, byte k2, short v2, byte k3, short v3) { return getDefaultFactory().newMutableMapOf(k1, v1, k2, v2, k3, v3); }
/** * Constructs a new updatable map of the four specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#newUpdatableMapOf(byte, short, * byte, short, byte, short, byte, short * ) newUpdatableMapOf(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 updatable map of the four specified mappings */ @Nonnull public static HashByteShortMap newUpdatableMapOf( byte k1, short v1, byte k2, short v2, byte k3, short v3, byte k4, short v4) { return getDefaultFactory().newUpdatableMapOf(k1, v1, k2, v2, k3, v3, k4, v4); }
/** * Constructs a new immutable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#newImmutableMapOf(byte, short, * byte, short) 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 HashByteShortMap newImmutableMapOf( byte k1, short v1, byte k2, short v2) { return getDefaultFactory().newImmutableMapOf(k1, v1, k2, v2); }
/** * 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 HashByteShortMapFactory#newUpdatableMap(Map, * Map) newUpdatableMap(map1, map2)}. * * @param map1 the first map to merge * @param map2 the second map to merge * * @return a new updatable map which merge the mappings of the specified maps */ @Nonnull public static HashByteShortMap newUpdatableMap( @Nonnull Map<Byte, Short> map1, @Nonnull Map<Byte, Short> map2) { return getDefaultFactory().newUpdatableMap(map1, map2); }
/** * Constructs a new mutable map with the same mappings as the specified {@code map}. * * * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteShortMapFactory#newMutableMap( * Map) newMutableMap(map)}. * * @param map the map whose mappings are to be placed in the returned map * * @return a new mutable map with the same mappings as the specified {@code map} */ @Nonnull public static HashByteShortMap newMutableMap( @Nonnull Map<Byte, Short> map) { return getDefaultFactory().newMutableMap(map); }