diff options
Diffstat (limited to 'guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java')
-rw-r--r-- | guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java b/guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java index dff7b124f..aabfbcbcb 100644 --- a/guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java +++ b/guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java @@ -18,6 +18,7 @@ package com.google.common.collect.testing.features; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.testing.Helpers; + import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -34,48 +35,57 @@ import java.util.Set; @GwtCompatible public enum MapFeature implements Feature<Map> { /** - * The map does not throw {@code NullPointerException} on calls such as {@code containsKey(null)}, - * {@code get(null)}, {@code keySet().contains(null)} or {@code remove(null)}. + * The map does not throw {@code NullPointerException} on calls such as + * {@code containsKey(null)}, {@code get(null)}, + * {@code keySet().contains(null)} or {@code remove(null)}. */ ALLOWS_NULL_KEY_QUERIES, ALLOWS_NULL_KEYS(ALLOWS_NULL_KEY_QUERIES), /** - * The map does not throw {@code NullPointerException} on calls such as {@code - * containsValue(null)}, {@code values().contains(null)} or {@code values().remove(null)}. + * The map does not throw {@code NullPointerException} on calls such as + * {@code containsValue(null)}, {@code values().contains(null)} or + * {@code values().remove(null)}. */ ALLOWS_NULL_VALUE_QUERIES, ALLOWS_NULL_VALUES(ALLOWS_NULL_VALUE_QUERIES), /** - * The map does not throw {@code NullPointerException} on calls such as {@code - * entrySet().contains(null)} or {@code entrySet().remove(null)} + * The map does not throw {@code NullPointerException} on calls such as + * {@code entrySet().contains(null)} or {@code entrySet().remove(null)} */ ALLOWS_NULL_ENTRY_QUERIES, /** - * The map does not throw {@code NullPointerException} on any {@code null} queries. + * The map does not throw {@code NullPointerException} on any {@code null} + * queries. * * @see #ALLOWS_NULL_KEY_QUERIES * @see #ALLOWS_NULL_VALUE_QUERIES * @see #ALLOWS_NULL_ENTRY_QUERIES */ ALLOWS_ANY_NULL_QUERIES( - ALLOWS_NULL_ENTRY_QUERIES, ALLOWS_NULL_KEY_QUERIES, ALLOWS_NULL_VALUE_QUERIES), + ALLOWS_NULL_ENTRY_QUERIES, + ALLOWS_NULL_KEY_QUERIES, + ALLOWS_NULL_VALUE_QUERIES + ), RESTRICTS_KEYS, RESTRICTS_VALUES, SUPPORTS_PUT, SUPPORTS_REMOVE, FAILS_FAST_ON_CONCURRENT_MODIFICATION, /** - * Indicates that the constructor or factory method of a map, usually an immutable map, throws an - * {@link IllegalArgumentException} when presented with duplicate keys instead of discarding all - * but one. + * Indicates that the constructor or factory method of a map, usually an + * immutable map, throws an {@link IllegalArgumentException} when presented + * with duplicate keys instead of discarding all but one. */ REJECTS_DUPLICATES_AT_CREATION, - GENERAL_PURPOSE(SUPPORTS_PUT, SUPPORTS_REMOVE); + GENERAL_PURPOSE( + SUPPORTS_PUT, + SUPPORTS_REMOVE + ); private final Set<Feature<? super Map>> implied; - MapFeature(Feature<? super Map>... implied) { + MapFeature(Feature<? super Map> ... implied) { this.implied = Helpers.copyToSet(implied); } @@ -89,7 +99,6 @@ public enum MapFeature implements Feature<Map> { @TesterAnnotation public @interface Require { public abstract MapFeature[] value() default {}; - public abstract MapFeature[] absent() default {}; } } |