abstract void setFields(List<K> keys, V[] values) throws IOException;
- /**
- * Create an {@link ImmutableOffsetMap} as a copy of an existing map. This is actually not completely true,
- * as this method returns an {@link ImmutableMap} for empty and singleton inputs, as those are more memory-efficient.
- * This method also recognizes {@link ImmutableOffsetMap} on input, and returns it back without doing anything else.
- * It also recognizes {@link MutableOffsetMap} (as returned by {@link #toModifiableMap()}) and makes an efficient
- * copy of its contents. All other maps are converted to an {@link ImmutableOffsetMap} with the same iteration
- * order as input.
- *
- * @param m Input map, may not be null.
- * @return An isolated, immutable copy of the input map
- * @deprecated Use {@link #orderedCopyOf(Map)} or {@link #unorderedCopyOf(Map)} instead.
- */
- @Deprecated
- @Nonnull public static <K, V> Map<K, V> copyOf(@Nonnull final Map<K, V> m) {
- return orderedCopyOf(m);
- }
-
/**
* Create an {@link ImmutableOffsetMap} as a copy of an existing map. This is actually not completely true,
* as this method returns an {@link ImmutableMap} for empty and singleton inputs, as those are more memory-efficient.
this.needClone = false;
}
- /**
- * @deprecated Use {@link #orderedCopyOf(Map)} or {@link #unorderedCopyOf(Map)} instead.
- */
- @Deprecated
- public static <K, V> MutableOffsetMap<K, V> copyOf(final Map<K, V> m) {
- return orderedCopyOf(m);
- }
-
public static <K, V> MutableOffsetMap<K, V> orderedCopyOf(final Map<K, V> m) {
if (m instanceof Ordered) {
return ((Ordered<K, V>) m).clone();
return new Unordered<>(m);
}
- /**
- * @deprecated Use {@link #ordered()} or {@link #unordered()} instead.
- */
- @Deprecated
- public static <K, V> MutableOffsetMap<K, V> of() {
- return ordered();
- }
-
public static <K, V> MutableOffsetMap<K, V> ordered() {
return new MutableOffsetMap.Ordered<>();
}
this.value = Preconditions.checkNotNull(value);
}
- /**
- * @deprecated Use {@link #orderedOf(Object, Object)} or {@link #unorderedOf(Object, Object)} instead.
- */
- @Deprecated
- public static <K, V> SharedSingletonMap<K, V> of(final K key, final V value) {
- return new Ordered<>(key, value);
- }
-
public static <K, V> SharedSingletonMap<K, V> orderedOf(final K key, final V value) {
return new Ordered<>(key, value);
}
return new Unordered<>(key, value);
}
- /**
- * @deprecated Use {@link #orderedCopyOf(Map)} or {@link #unorderedCopyOf(Map)} instead.
- */
- @Deprecated
- public static <K, V> SharedSingletonMap<K, V> copyOf(final Map<K, V> m) {
- return orderedCopyOf(m);
- }
-
public static <K, V> SharedSingletonMap<K, V> orderedCopyOf(final Map<K, V> m) {
Preconditions.checkArgument(m.size() == 1);