/** * 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 HashByteByteMapFactory#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 HashByteByteMap newImmutableMap( @Nonnull Map<Byte, Byte> map) { return getDefaultFactory().newImmutableMap(map); }
/** * Constructs a new immutable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newImmutableMapOf(byte, byte, * byte, byte) 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 HashByteByteMap newImmutableMapOf( byte k1, byte v1, byte k2, byte v2) { return getDefaultFactory().newImmutableMapOf(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 HashByteByteMapFactory#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 HashByteByteMap newMutableMap(int expectedSize) { return getDefaultFactory().newMutableMap(expectedSize); }
/** * Constructs a new empty updatable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newUpdatableMap() newUpdatableMap()}. * * @return a new empty updatable map */ @Nonnull public static HashByteByteMap newUpdatableMap() { return getDefaultFactory().newUpdatableMap(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteByteMapFactory) { HashByteByteMapFactory factory = (HashByteByteMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Byte) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new updatable map of the single specified mapping. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newUpdatableMapOf(byte, byte * ) 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 HashByteByteMap newUpdatableMapOf( byte k1, byte v1) { return getDefaultFactory().newUpdatableMapOf(k1, v1); }
/** * Constructs a new mutable map of the single specified mapping. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newMutableMapOf(byte, byte * ) 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 HashByteByteMap newMutableMapOf( byte k1, byte v1) { return getDefaultFactory().newMutableMapOf(k1, v1); }
/** * Constructs a new empty updatable map of the given expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#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 HashByteByteMap newUpdatableMap(int expectedSize) { return getDefaultFactory().newUpdatableMap(expectedSize); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteByteMapFactory) { HashByteByteMapFactory factory = (HashByteByteMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Byte) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new updatable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newUpdatableMapOf(byte, byte, * byte, byte) 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 HashByteByteMap newUpdatableMapOf( byte k1, byte v1, byte k2, byte v2) { return getDefaultFactory().newUpdatableMapOf(k1, v1, k2, v2); }
/** * Constructs a new mutable map of the two specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newMutableMapOf(byte, byte, * byte, byte) 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 HashByteByteMap newMutableMapOf( byte k1, byte v1, byte k2, byte v2) { return getDefaultFactory().newMutableMapOf(k1, v1, k2, v2); }
/** * Constructs a new updatable 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 HashByteByteMapFactory#newUpdatableMap(Map, Map, * Map, int) newUpdatableMap(map1, map2, map3, expectedSize)}. * * @param map1 the first map to merge * @param map2 the second map to merge * @param map3 the third 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 HashByteByteMap newUpdatableMap( @Nonnull Map<Byte, Byte> map1, @Nonnull Map<Byte, Byte> map2, @Nonnull Map<Byte, Byte> map3, int expectedSize) { return getDefaultFactory().newUpdatableMap(map1, map2, map3, expectedSize); }
/** * Constructs a new empty mutable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newMutableMap() newMutableMap()}. * * @return a new empty mutable map */ @Nonnull public static HashByteByteMap newMutableMap() { return getDefaultFactory().newMutableMap(); }
/** * Constructs a new immutable map filled with mappings consumed by the callback within the given * closure. Mappings supplied later within the closure have priority over the mappings * passed earlier with the same keys. * * <p>Example: TODO * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newImmutableMap( * Consumer) newImmutableMap(entriesSupplier)}. * * @param entriesSupplier the function which supply mappings for the returned map via * the callback passed in * * @return a new immutable map with mappings consumed by the callback within the given closure */ @Nonnull public static HashByteByteMap newImmutableMap(@Nonnull Consumer<net.openhft.koloboke.function.ByteByteConsumer> entriesSupplier ) { return getDefaultFactory().newImmutableMap(entriesSupplier); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashByteByteMapFactory) { HashByteByteMapFactory factory = (HashByteByteMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Byte) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new updatable map of the three specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newUpdatableMapOf(byte, byte, * byte, byte, byte, byte) 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 HashByteByteMap newUpdatableMapOf( byte k1, byte v1, byte k2, byte v2, byte k3, byte v3) { return getDefaultFactory().newUpdatableMapOf(k1, v1, k2, v2, k3, v3); }
/** * Constructs a new mutable map of the three specified mappings. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newMutableMapOf(byte, byte, * byte, byte, byte, byte) 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 HashByteByteMap newMutableMapOf( byte k1, byte v1, byte k2, byte v2, byte k3, byte v3) { return getDefaultFactory().newMutableMapOf(k1, v1, k2, v2, k3, v3); }
/** * Constructs a new immutable map of the single specified mapping. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newImmutableMapOf(byte, byte * ) 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 HashByteByteMap newImmutableMapOf( byte k1, byte v1) { return getDefaultFactory().newImmutableMapOf(k1, v1); }
/** * Constructs a new updatable map filled with mappings consumed by the callback within the given * closure. Mappings supplied later within the closure have priority over the mappings * passed earlier with the same keys. * * <p>Example: TODO * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashByteByteMapFactory#newUpdatableMap( * Consumer, int) newUpdatableMap(entriesSupplier, expectedSize)}. * * @param entriesSupplier the function which supply mappings for the returned map via * the callback passed in * @param expectedSize the expected size of the returned map * @return a new updatable map with mappings consumed by the callback within the given closure */ @Nonnull public static HashByteByteMap newUpdatableMap(@Nonnull Consumer<net.openhft.koloboke.function.ByteByteConsumer> entriesSupplier , int expectedSize) { return getDefaultFactory().newUpdatableMap(entriesSupplier, 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 HashByteByteMapFactory#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 HashByteByteMap newMutableMap( @Nonnull Map<Byte, Byte> map) { return getDefaultFactory().newMutableMap(map); }