@Override public String toString() { return "HashShortByteMapFactory[" + commonString() + keySpecialString() + ",defaultValue=" + getDefaultValue() + "]"; }
@Override public final HashShortByteMapFactory withDefaultExpectedSize(int defaultExpectedSize) { if (defaultExpectedSize == getDefaultExpectedSize()) return this; return thisWith(getHashConfig(), defaultExpectedSize , getLowerKeyDomainBound(), getUpperKeyDomainBound()); }
@Override public final HashShortByteMapFactory withHashConfig(@Nonnull HashConfig hashConf) { if (configIsSuitableForMutableLHash(hashConf)) return lHashLikeThisWith(hashConf, getDefaultExpectedSize() , getLowerKeyDomainBound(), getUpperKeyDomainBound()); return qHashLikeThisWith(hashConf, getDefaultExpectedSize() , getLowerKeyDomainBound(), getUpperKeyDomainBound()); }
@Override @Nonnull public UpdatableQHashSeparateKVShortByteMapGO newUpdatableMap() { return this.newUpdatableMap(getDefaultExpectedSize()); } @Override
@Override public int hashCode() { int hashCode = keySpecialHashCode(commonHashCode()); hashCode = hashCode * 31 + Primitives.hashCode(getDefaultValue()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashShortByteMapFactory) { HashShortByteMapFactory factory = (HashShortByteMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Byte) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
@Override @Nonnull public MutableQHashSeparateKVShortByteMapGO newMutableMap() { return this.newMutableMap(getDefaultExpectedSize()); }
@Override public final HashShortByteMapFactory withHashConfig(@Nonnull HashConfig hashConf) { if (configIsSuitableForMutableLHash(hashConf)) return lHashLikeThisWith(hashConf, getDefaultExpectedSize() , getLowerKeyDomainBound(), getUpperKeyDomainBound()); return qHashLikeThisWith(hashConf, getDefaultExpectedSize() , getLowerKeyDomainBound(), getUpperKeyDomainBound()); }
@Override @Nonnull public UpdatableQHashSeparateKVShortByteMapGO newUpdatableMap() { return this.newUpdatableMap(getDefaultExpectedSize()); } @Override
@Override public int hashCode() { int hashCode = keySpecialHashCode(commonHashCode()); hashCode = hashCode * 31 + Primitives.hashCode(getDefaultValue()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashShortByteMapFactory) { HashShortByteMapFactory factory = (HashShortByteMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Byte) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
@Override @Nonnull public MutableQHashSeparateKVShortByteMapGO newMutableMap() { return this.newMutableMap(getDefaultExpectedSize()); }
final HashShortByteMapFactory withDomain(short lower, short upper) { if (lower == getLowerKeyDomainBound() && upper == getUpperKeyDomainBound()) return this; return thisWith(getHashConfig(), getDefaultExpectedSize(), lower, upper); }
@Override @Nonnull public UpdatableQHashSeparateKVShortByteMapGO newUpdatableMap( Consumer<com.koloboke.function.ShortByteConsumer> entriesSupplier) { return this.newUpdatableMap(entriesSupplier, getDefaultExpectedSize()); }
@Override public String toString() { return "HashShortByteMapFactory[" + commonString() + keySpecialString() + ",defaultValue=" + getDefaultValue() + "]"; }
@Override public final HashShortByteMapFactory withDefaultExpectedSize(int defaultExpectedSize) { if (defaultExpectedSize == getDefaultExpectedSize()) return this; return thisWith(getHashConfig(), defaultExpectedSize , getLowerKeyDomainBound(), getUpperKeyDomainBound()); }
@Override @Nonnull public UpdatableQHashSeparateKVShortByteMapGO newUpdatableMap( Consumer<com.koloboke.function.ShortByteConsumer> entriesSupplier) { return this.newUpdatableMap(entriesSupplier, getDefaultExpectedSize()); }
final HashShortByteMapFactory withDomain(short lower, short upper) { if (lower == getLowerKeyDomainBound() && upper == getUpperKeyDomainBound()) return this; return thisWith(getHashConfig(), getDefaultExpectedSize(), lower, upper); }
@Override @Nonnull public UpdatableQHashSeparateKVShortByteMapGO newUpdatableMap( Iterable<Short> keys, Iterable<Byte> values) { int expectedSize = keys instanceof Collection ? ((Collection) keys).size() : getDefaultExpectedSize(); return this.newUpdatableMap(keys, values, expectedSize); }
@Override @Nonnull public UpdatableQHashSeparateKVShortByteMapGO newUpdatableMap( Iterable<Short> keys, Iterable<Byte> values) { int expectedSize = keys instanceof Collection ? ((Collection) keys).size() : getDefaultExpectedSize(); return this.newUpdatableMap(keys, values, expectedSize); }