Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (C) 2009 The Guava Authors
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package com.google.common.collect;
 
"Overrides" the ImmutableMap static methods that lack ImmutableSortedMap equivalents with deprecated, exception-throwing versions. See ImmutableSortedSetFauxverideShim for details.

Author(s):
Chris Povirk
 
 abstract class ImmutableSortedMapFauxverideShim<K, V>
     extends ImmutableMap<K, V> {
  
Not supported. Use ImmutableSortedMap.naturalOrder(), which offers better type-safety, instead. This method exists only to hide ImmutableMap.builder() from consumers of ImmutableSortedMap.

Deprecated:
Use ImmutableSortedMap.naturalOrder(), which offers better type-safety.
Throws:
java.lang.UnsupportedOperationException always
 
   @Deprecated public static <K, V> ImmutableSortedMap.Builder<K, V> builder() {
     throw new UnsupportedOperationException();
   }

  
Not supported. You are attempting to create a map that may contain a non-Comparable key. Proper calls will resolve to the version in ImmutableSortedMap, not this dummy version.

 
   @Deprecated public static <K, V> ImmutableSortedMap<K, V> of(K k1, V v1) {
     throw new UnsupportedOperationException();
   }

  
Not supported. You are attempting to create a map that may contain non-Comparable keys. Proper calls will resolve to the version in ImmutableSortedMap, not this dummy version.

 
   @Deprecated public static <K, V> ImmutableSortedMap<K, V> of(
       K k1, V v1, K k2, V v2) {
     throw new UnsupportedOperationException();
   }

  
Not supported. You are attempting to create a map that may contain non-Comparable keys. Proper calls to will resolve to the version in ImmutableSortedMap, not this dummy version.

 
   @Deprecated public static <K, V> ImmutableSortedMap<K, V> of(
       K k1, V v1, K k2, V v2, K k3, V v3) {
     throw new UnsupportedOperationException();
   }

  
Not supported. You are attempting to create a map that may contain non-Comparable keys. Proper calls will resolve to the version in ImmutableSortedMap, not this dummy version.

 
   @Deprecated public static <K, V> ImmutableSortedMap<K, V> of(
       K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) {
     throw new UnsupportedOperationException();
   }

  
Not supported. You are attempting to create a map that may contain non-Comparable keys. Proper calls will resolve to the version in ImmutableSortedMap, not this dummy version.

  @Deprecated public static <K, V> ImmutableSortedMap<K, V> of(
      K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) {
    throw new UnsupportedOperationException();
  }
  // No copyOf() fauxveride; see ImmutableSortedSetFauxverideShim.
New to GrepCode? Check out our FAQ X