/** * 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 HashByteObjMapFactory#newImmutableMap( * Map) newImmutableMap(map)}. * * @param map the map whose mappings are to be placed in the returned map * * @param <V> the value type of the returned map * @return a new immutable map with the same mappings as the specified {@code map} */ @Nonnull public static <V> HashByteObjMap<V> newImmutableMap( @Nonnull Map<Byte, ? extends V> 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 HashByteObjMapFactory#newImmutableMapOf(byte, Object * ) newImmutableMapOf(k1, v1)}. * * @param k1 the key of the sole mapping * @param v1 the value of the sole mapping * @param <V> the value type of the returned map * @return a new immutable map of the single specified mapping */ @Nonnull public static <V> HashByteObjMap<V> newImmutableMapOf( byte k1, V 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 HashByteObjMapFactory#newMutableMap() newMutableMap()}. * * @param <V> the value type of the returned map * @return a new empty mutable map */ @Nonnull public static <V> HashByteObjMap<V> 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 HashByteObjMapFactory#newUpdatableMap() newUpdatableMap()}. * * @param <V> the value type of the returned map * @return a new empty updatable map */ @Nonnull public static <V> HashByteObjMap<V> newUpdatableMap() { return getDefaultFactory().newUpdatableMap(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteObjMapFactory) { HashByteObjMapFactory factory = (HashByteObjMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && getValueEquivalence().equals(factory.getValueEquivalence()) ; } else { return false; } }
/** * Constructs a new mutable map of the single specified mapping. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteObjMapFactory#newMutableMapOf(byte, Object * ) newMutableMapOf(k1, v1)}. * * @param k1 the key of the sole mapping * @param v1 the value of the sole mapping * @param <V> the value type of the returned map * @return a new mutable map of the single specified mapping */ @Nonnull public static <V> HashByteObjMap<V> newMutableMapOf( byte k1, V 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 HashByteObjMapFactory#newUpdatableMapOf(byte, Object * ) newUpdatableMapOf(k1, v1)}. * * @param k1 the key of the sole mapping * @param v1 the value of the sole mapping * @param <V> the value type of the returned map * @return a new updatable map of the single specified mapping */ @Nonnull public static <V> HashByteObjMap<V> newUpdatableMapOf( byte k1, V 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 HashByteObjMapFactory#newUpdatableMap(int) newUpdatableMap(expectedSize)}. * * @param expectedSize the expected size of the returned map * @param <V> the value type of the returned map * @return a new empty updatable map of the given expected size */ @Nonnull public static <V> HashByteObjMap<V> newUpdatableMap(int expectedSize) { return getDefaultFactory().newUpdatableMap(expectedSize); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteObjMapFactory) { HashByteObjMapFactory factory = (HashByteObjMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && getValueEquivalence().equals(factory.getValueEquivalence()) ; } else { return false; } }
/** * Constructs a new mutable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteObjMapFactory#newMutableMapOf(byte, Object, * byte, Object) 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 * @param <V> the value type of the returned map * @return a new mutable map of the two specified mappings */ @Nonnull public static <V> HashByteObjMap<V> newMutableMapOf( byte k1, V v1, byte k2, V 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 HashByteObjMapFactory#newUpdatableMapOf(byte, Object, * byte, Object) 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 * @param <V> the value type of the returned map * @return a new updatable map of the two specified mappings */ @Nonnull public static <V> HashByteObjMap<V> newUpdatableMapOf( byte k1, V v1, byte k2, V 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 HashByteObjMapFactory#newUpdatableMap( * Map) newUpdatableMap(map)}. * * @param map the map whose mappings are to be placed in the returned map * * @param <V> the value type of the returned map * @return a new updatable map with the same mappings as the specified {@code map} */ @Nonnull public static <V> HashByteObjMap<V> newUpdatableMap( @Nonnull Map<Byte, ? extends V> map) { return getDefaultFactory().newUpdatableMap(map); }
/** * Constructs a new empty mutable map of the given expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteObjMapFactory#newMutableMap(int) newMutableMap(expectedSize)}. * * @param expectedSize the expected size of the returned map * @param <V> the value type of the returned map * @return a new empty mutable map of the given expected size */ @Nonnull public static <V> HashByteObjMap<V> newMutableMap(int expectedSize) { return getDefaultFactory().newMutableMap(expectedSize); }
/** * 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 HashByteObjMapFactory#newImmutableMap(Map, * Map) newImmutableMap(map1, map2)}. * * @param map1 the first map to merge * @param map2 the second map to merge * * @param <V> the value type of the returned map * @return a new immutable map which merge the mappings of the specified maps */ @Nonnull public static <V> HashByteObjMap<V> newImmutableMap( @Nonnull Map<Byte, ? extends V> map1, @Nonnull Map<Byte, ? extends V> map2) { return getDefaultFactory().newImmutableMap(map1, map2); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteObjMapFactory) { HashByteObjMapFactory factory = (HashByteObjMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && getValueEquivalence().equals(factory.getValueEquivalence()) ; } else { return false; } }
/** * Constructs a new mutable map of the three specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteObjMapFactory#newMutableMapOf(byte, Object, * byte, Object, byte, Object) 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 * @param <V> the value type of the returned map * @return a new mutable map of the three specified mappings */ @Nonnull public static <V> HashByteObjMap<V> newMutableMapOf( byte k1, V v1, byte k2, V v2, byte k3, V v3) { return getDefaultFactory().newMutableMapOf(k1, v1, k2, v2, k3, v3); }
/** * Constructs a new updatable map of the three specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteObjMapFactory#newUpdatableMapOf(byte, Object, * byte, Object, byte, Object) 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 * @param <V> the value type of the returned map * @return a new updatable map of the three specified mappings */ @Nonnull public static <V> HashByteObjMap<V> newUpdatableMapOf( byte k1, V v1, byte k2, V v2, byte k3, V v3) { return getDefaultFactory().newUpdatableMapOf(k1, v1, k2, v2, k3, v3); }
/** * Constructs a new immutable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteObjMapFactory#newImmutableMapOf(byte, Object, * byte, Object) 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 * @param <V> the value type of the returned map * @return a new immutable map of the two specified mappings */ @Nonnull public static <V> HashByteObjMap<V> newImmutableMapOf( byte k1, V v1, byte k2, V v2) { return getDefaultFactory().newImmutableMapOf(k1, v1, k2, v2); }
/** * Constructs a new updatable 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 HashByteObjMapFactory#newUpdatableMap(Byte[], * Object[], int) newUpdatableMap(keys, values, expectedSize)}. * * @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 * @param expectedSize the expected size of the returned map * @param <V> the value type of the returned map * @return a new updatable map with the given mappings * @throws IllegalArgumentException if {@code keys} and {@code values} arrays have different * length */ @Nonnull public static <V> HashByteObjMap<V> newUpdatableMap( @Nonnull Byte[] keys, @Nonnull V[] values, int expectedSize) { return getDefaultFactory().newUpdatableMap(keys, values, expectedSize); }
/** * 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 HashByteObjMapFactory#newMutableMap( * Map) newMutableMap(map)}. * * @param map the map whose mappings are to be placed in the returned map * * @param <V> the value type of the returned map * @return a new mutable map with the same mappings as the specified {@code map} */ @Nonnull public static <V> HashByteObjMap<V> newMutableMap( @Nonnull Map<Byte, ? extends V> map) { return getDefaultFactory().newMutableMap(map); }