| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package com.google.common.collect.testing.features; |
| 18 |
|
| 19 |
import com.google.common.annotations.GwtCompatible; |
| 20 |
import com.google.common.collect.testing.Helpers; |
| 21 |
import java.lang.annotation.Inherited; |
| 22 |
import java.lang.annotation.Retention; |
| 23 |
import java.lang.annotation.RetentionPolicy; |
| 24 |
import java.util.Set; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
@SuppressWarnings("unchecked") |
| 33 |
@GwtCompatible |
| 34 |
public enum SetFeature implements Feature<Set> { |
| 35 |
GENERAL_PURPOSE(CollectionFeature.GENERAL_PURPOSE); |
| 36 |
|
| 37 |
private final Set<Feature<? super Set>> implied; |
| 38 |
|
| 39 |
SetFeature(Feature<? super Set>... implied) { |
| 40 |
this.implied = Helpers.copyToSet(implied); |
| 41 |
} |
| 42 |
|
| 43 |
@Override |
| 44 |
public Set<Feature<? super Set>> getImpliedFeatures() { |
| 45 |
return implied; |
| 46 |
} |
| 47 |
|
| 48 |
@Retention(RetentionPolicy.RUNTIME) |
| 49 |
@Inherited |
| 50 |
@TesterAnnotation |
| 51 |
public @interface Require { |
| 52 |
public abstract SetFeature[] value() default {}; |
| 53 |
|
| 54 |
public abstract SetFeature[] absent() default {}; |
| 55 |
} |
| 56 |
} |