10888a09821a98ac0680fad765217302858e70fa4Paul Duffin/* 20888a09821a98ac0680fad765217302858e70fa4Paul Duffin * Copyright (C) 2013 The Guava Authors 30888a09821a98ac0680fad765217302858e70fa4Paul Duffin * 40888a09821a98ac0680fad765217302858e70fa4Paul Duffin * Licensed under the Apache License, Version 2.0 (the "License"); 50888a09821a98ac0680fad765217302858e70fa4Paul Duffin * you may not use this file except in compliance with the License. 60888a09821a98ac0680fad765217302858e70fa4Paul Duffin * You may obtain a copy of the License at 70888a09821a98ac0680fad765217302858e70fa4Paul Duffin * 80888a09821a98ac0680fad765217302858e70fa4Paul Duffin * http://www.apache.org/licenses/LICENSE-2.0 90888a09821a98ac0680fad765217302858e70fa4Paul Duffin * 100888a09821a98ac0680fad765217302858e70fa4Paul Duffin * Unless required by applicable law or agreed to in writing, software 110888a09821a98ac0680fad765217302858e70fa4Paul Duffin * distributed under the License is distributed on an "AS IS" BASIS, 120888a09821a98ac0680fad765217302858e70fa4Paul Duffin * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130888a09821a98ac0680fad765217302858e70fa4Paul Duffin * See the License for the specific language governing permissions and 140888a09821a98ac0680fad765217302858e70fa4Paul Duffin * limitations under the License. 150888a09821a98ac0680fad765217302858e70fa4Paul Duffin */ 160888a09821a98ac0680fad765217302858e70fa4Paul Duffin 170888a09821a98ac0680fad765217302858e70fa4Paul Duffinpackage com.google.common.collect.testing.google; 180888a09821a98ac0680fad765217302858e70fa4Paul Duffin 190888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport com.google.common.annotations.GwtCompatible; 200888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport com.google.common.collect.Multiset; 210888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport com.google.common.collect.testing.features.Feature; 220888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport com.google.common.collect.testing.features.TesterAnnotation; 230888a09821a98ac0680fad765217302858e70fa4Paul Duffin 240888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport java.lang.annotation.Inherited; 250888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport java.lang.annotation.Retention; 260888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport java.lang.annotation.RetentionPolicy; 270888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport java.util.Collections; 280888a09821a98ac0680fad765217302858e70fa4Paul Duffinimport java.util.Set; 290888a09821a98ac0680fad765217302858e70fa4Paul Duffin 300888a09821a98ac0680fad765217302858e70fa4Paul Duffin/** 310888a09821a98ac0680fad765217302858e70fa4Paul Duffin * Optional features of classes derived from {@link Multiset}. 320888a09821a98ac0680fad765217302858e70fa4Paul Duffin * 330888a09821a98ac0680fad765217302858e70fa4Paul Duffin * @author Louis Wasserman 340888a09821a98ac0680fad765217302858e70fa4Paul Duffin */ 350888a09821a98ac0680fad765217302858e70fa4Paul Duffin@GwtCompatible 360888a09821a98ac0680fad765217302858e70fa4Paul Duffinpublic enum MultisetFeature implements Feature<Multiset> { 370888a09821a98ac0680fad765217302858e70fa4Paul Duffin /** 380888a09821a98ac0680fad765217302858e70fa4Paul Duffin * Indicates that elements from {@code Multiset.entrySet()} update to reflect changes in the 390888a09821a98ac0680fad765217302858e70fa4Paul Duffin * backing multiset. 400888a09821a98ac0680fad765217302858e70fa4Paul Duffin */ 410888a09821a98ac0680fad765217302858e70fa4Paul Duffin ENTRIES_ARE_VIEWS; 420888a09821a98ac0680fad765217302858e70fa4Paul Duffin 430888a09821a98ac0680fad765217302858e70fa4Paul Duffin @Override 440888a09821a98ac0680fad765217302858e70fa4Paul Duffin public Set<Feature<? super Multiset>> getImpliedFeatures() { 450888a09821a98ac0680fad765217302858e70fa4Paul Duffin return Collections.emptySet(); 460888a09821a98ac0680fad765217302858e70fa4Paul Duffin } 470888a09821a98ac0680fad765217302858e70fa4Paul Duffin 480888a09821a98ac0680fad765217302858e70fa4Paul Duffin @Retention(RetentionPolicy.RUNTIME) 490888a09821a98ac0680fad765217302858e70fa4Paul Duffin @Inherited 500888a09821a98ac0680fad765217302858e70fa4Paul Duffin @TesterAnnotation 510888a09821a98ac0680fad765217302858e70fa4Paul Duffin public @interface Require { 520888a09821a98ac0680fad765217302858e70fa4Paul Duffin public abstract MultisetFeature[] value() default {}; 530888a09821a98ac0680fad765217302858e70fa4Paul Duffin public abstract MultisetFeature[] absent() default {}; 540888a09821a98ac0680fad765217302858e70fa4Paul Duffin } 550888a09821a98ac0680fad765217302858e70fa4Paul Duffin} 56