blob: 6487d96f0efdceb4d56a8958e094fc929ea99a9e [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
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 */
tomf5d85d42014-10-02 05:27:56 -070016package org.onlab.onos.net;
17
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
33 public Set<String> keys();
34
35 /**
36 * Indicates whether the specified key has been tagged as removed. This is
37 * used to for merging sparse annotation sets.
38 *
39 * @param key annotation key
40 * @return true if the previous annotation has been tagged for removal
41 */
42 public boolean isRemoved(String key);
43
44}