blob: abe6cd196fa5d934bf8ef78cfa0a2e8fece2429b [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}
28 * <p/>
29 * Note that this set includes keys for any attributes tagged for removal.
30 */
31 @Override
32 public Set<String> keys();
33
34 /**
35 * Indicates whether the specified key has been tagged as removed. This is
36 * used to for merging sparse annotation sets.
37 *
38 * @param key annotation key
39 * @return true if the previous annotation has been tagged for removal
40 */
41 public boolean isRemoved(String key);
42
43}