@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<>(singleValue, singleKey, this); } else { return result; } } }
/** Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<>(k1, v1); }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<>(singleValue, singleKey, this); } else { return result; } } }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<>(singleValue, singleKey, this); } else { return result; } } }
/** Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<>(k1, v1); }
public static SingletonImmutableBiMap<Object, Object> instantiate( SerializationStreamReader reader) throws SerializationException { Object key = checkNotNull(reader.readObject()); Object value = checkNotNull(reader.readObject()); return new SingletonImmutableBiMap<>(key, value); }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<V, K>( singleValue, singleKey, this); } else { return result; } } }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<V, K>(singleValue, singleKey, this); } else { return result; } } }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<V, K>( singleValue, singleKey, this); } else { return result; } } }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<V, K>( singleValue, singleKey, this); } else { return result; } } }
/** * Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<K, V>(k1, v1); }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<>(singleValue, singleKey, this); } else { return result; } } }
/** * Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<K, V>(k1, v1); }
@Override public ImmutableBiMap<V, K> inverse() { // racy single-check idiom ImmutableBiMap<V, K> result = inverse; if (result == null) { return inverse = new SingletonImmutableBiMap<V, K>( singleValue, singleKey, this); } else { return result; } } }
/** * Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<K, V>(k1, v1); }
/** * Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<K, V>(k1, v1); }
/** * Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<K, V>(k1, v1); }
/** * Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { return new SingletonImmutableBiMap<K, V>(k1, v1); }
/** * Returns an immutable bimap containing a single entry. */ public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1) { checkNotNull(k1, "null key in entry: null=%s", v1); checkNotNull(v1, "null value in entry: %s=null", k1); return new SingletonImmutableBiMap<K, V>(k1, v1); }
public static SingletonImmutableBiMap<Object, Object> instantiate( SerializationStreamReader reader) throws SerializationException { Object key = checkNotNull(reader.readObject()); Object value = checkNotNull(reader.readObject()); return new SingletonImmutableBiMap<>(key, value); }