aboutsummaryrefslogtreecommitdiffstats
path: root/guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java
diff options
context:
space:
mode:
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.java17
1 files changed, 12 insertions, 5 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 482d5b9..8d97a09 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
@@ -16,7 +16,6 @@
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;
@@ -34,7 +33,6 @@ import java.util.Set;
*/
// Enum values use constructors with generic varargs.
@SuppressWarnings("unchecked")
-@GwtCompatible
public enum MapFeature implements Feature<Map> {
/**
* The map does not throw {@code NullPointerException} on calls such as
@@ -46,8 +44,9 @@ public enum MapFeature implements Feature<Map> {
RESTRICTS_KEYS,
RESTRICTS_VALUES,
SUPPORTS_PUT,
+ SUPPORTS_PUT_ALL,
SUPPORTS_REMOVE,
- FAILS_FAST_ON_CONCURRENT_MODIFICATION,
+ SUPPORTS_CLEAR,
/**
* Indicates that the constructor or factory method of a map, usually an
* immutable map, throws an {@link IllegalArgumentException} when presented
@@ -57,8 +56,16 @@ public enum MapFeature implements Feature<Map> {
GENERAL_PURPOSE(
SUPPORTS_PUT,
- SUPPORTS_REMOVE
- );
+ SUPPORTS_PUT_ALL,
+ SUPPORTS_REMOVE,
+ SUPPORTS_CLEAR
+ ),
+
+ /** Features supported by maps where only removal is allowed. */
+ REMOVE_OPERATIONS(
+ SUPPORTS_REMOVE,
+ SUPPORTS_CLEAR
+ );
private final Set<Feature<? super Map>> implied;