public static <K0 extends Enum<K0>> MultimapBuilderWithKeys<K0> enumKeys(
      final Class<K0> keyClass) {
    checkNotNull(keyClass);
    return new MultimapBuilderWithKeys<K0>() {
      @SuppressWarnings("unchecked")
      @Override
      <K extends K0, V> Map<K, Collection<V>> createMap() {
        // K must actually be K0, since enums are effectively final
        // (their subclasses are inaccessible)
        return (Map<K, Collection<V>>) new EnumMap<K0, Collection<V>>(keyClass);
      }
    };
  }
public static <K0 extends Enum<K0>> MultimapBuilderWithKeys<K0> enumKeys(
      final Class<K0> keyClass) {
    checkNotNull(keyClass);
    return new MultimapBuilderWithKeys<K0>() {
      @SuppressWarnings("unchecked")
      @Override
      <K extends K0, V> Map<K, Collection<V>> createMap() {
        
        
        return (Map<K, Collection<V>>) new EnumMap<K0, Collection<V>>(keyClass);
      }
    };
  }
public static < K0 extends Enum < K0 > > MultimapBuilderWithKeys < K0 > enumKeys ( final Class < K0 > keyClass ) { checkNotNull ( keyClass ) ; return new MultimapBuilderWithKeys < K0 > ( ) { @ SuppressWarnings ( "unchecked" ) @ Override < K extends K0 , V > Map < K , Collection < V > > createMap ( ) { // K must actually be K0, since enums are effectively final // (their subclasses are inaccessible) return ( Map < K , Collection < V > > ) new EnumMap < K0 , Collection < V > > ( keyClass ) ; } } ; }
Uses an {@link EnumMap} to map keys to value collections.

@since 16.0
Uses an { @link EnumMap } to map keys to value collections .