/** * Constructs a new empty mutable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharShortMapFactory#newMutableMap() newMutableMap()}. * // typeParams // * @return a new empty mutable map */ @Nonnull public static /*<>*/ HashCharShortMap/*<>*/ newMutableMap() { return getDefaultFactory()./*<>*/newMutableMap(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashCharShortMapFactory) { HashCharShortMapFactory factory = (HashCharShortMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Short) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashCharShortMapFactory) { HashCharShortMapFactory factory = (HashCharShortMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Short) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
/** * Constructs a new empty mutable map of the default expected size. * * <p>This method simply delegates to {@link #getDefaultFactory() * }<tt>.</tt>{@link HashCharShortMapFactory#newMutableMap() newMutableMap()}. * // typeParams // * @return a new empty mutable map */ @Nonnull public static /*<>*/ HashCharShortMap/*<>*/ newMutableMap() { return getDefaultFactory()./*<>*/newMutableMap(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashCharShortMapFactory) { HashCharShortMapFactory factory = (HashCharShortMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Short) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
private static class DefaultFactoryHolder { private static final HashCharShortMapFactory defaultFactory = ServiceLoader.load(HashCharShortMapFactory.class).iterator().next(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof HashCharShortMapFactory) { HashCharShortMapFactory factory = (HashCharShortMapFactory) obj; return commonEquals(factory) && keySpecialEquals(factory) && // boxing to treat NaNs correctly ((Short) getDefaultValue()).equals(factory.getDefaultValue()) ; } else { return false; } }
private static class DefaultFactoryHolder { private static final HashCharShortMapFactory defaultFactory = ServiceLoader.load(HashCharShortMapFactory.class).iterator().next(); }