blob: 785c7cfc239b304eb9490b71212f257c46a8e335 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2014-present Open Networking Foundation
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net;
tomf5d85d42014-10-02 05:27:56 -070017
18import java.util.Set;
19
20/**
tom44179d62014-10-02 05:31:25 -070021 * Represents an set of sparse key/value string annotations capable of carrying
22 * annotation keys tagged for removal.
tomf5d85d42014-10-02 05:27:56 -070023 */
24public interface SparseAnnotations extends Annotations {
25
26 /**
27 * {@inheritDoc}
Thomas Vachuska4b420772014-10-30 16:46:17 -070028 * <p>
tomf5d85d42014-10-02 05:27:56 -070029 * Note that this set includes keys for any attributes tagged for removal.
Thomas Vachuska4b420772014-10-30 16:46:17 -070030 * </p>
tomf5d85d42014-10-02 05:27:56 -070031 */
32 @Override
Sho SHIMIZU3310a342015-05-13 12:14:05 -070033 Set<String> keys();
tomf5d85d42014-10-02 05:27:56 -070034
35 /**
36 * Indicates whether the specified key has been tagged as removed. This is
Marc De Leenheerbb382352015-04-23 18:20:34 -070037 * used for merging sparse annotation sets.
tomf5d85d42014-10-02 05:27:56 -070038 *
39 * @param key annotation key
40 * @return true if the previous annotation has been tagged for removal
41 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070042 boolean isRemoved(String key);
tomf5d85d42014-10-02 05:27:56 -070043
44}