Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 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 | */ |
| 16 | package org.onosproject.store.service; |
| 17 | |
| 18 | import java.util.Collection; |
| 19 | import java.util.Map; |
| 20 | import java.util.Set; |
| 21 | import java.util.function.BiFunction; |
| 22 | import java.util.function.Function; |
| 23 | import java.util.function.Predicate; |
| 24 | |
| 25 | /** |
| 26 | * Testing adapter for the consistent map. |
| 27 | */ |
| 28 | public class ConsistentMapAdapter<K, V> implements ConsistentMap<K, V> { |
| 29 | @Override |
| 30 | public int size() { |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public boolean isEmpty() { |
| 36 | return false; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public boolean containsKey(K key) { |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public boolean containsValue(V value) { |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | public Versioned<V> get(K key) { |
| 51 | return null; |
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public Versioned<V> computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { |
| 56 | return null; |
| 57 | } |
| 58 | |
| 59 | @Override |
| 60 | public Versioned<V> compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 61 | return null; |
| 62 | } |
| 63 | |
| 64 | @Override |
| 65 | public Versioned<V> computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 66 | return null; |
| 67 | } |
| 68 | |
| 69 | @Override |
| 70 | public Versioned<V> computeIf(K key, Predicate<? super V> condition, |
| 71 | BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 72 | return null; |
| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public Versioned<V> put(K key, V value) { |
| 77 | return null; |
| 78 | } |
| 79 | |
| 80 | @Override |
| 81 | public Versioned<V> putAndGet(K key, V value) { |
| 82 | return null; |
| 83 | } |
| 84 | |
| 85 | @Override |
| 86 | public Versioned<V> remove(K key) { |
| 87 | return null; |
| 88 | } |
| 89 | |
| 90 | @Override |
| 91 | public void clear() { |
| 92 | |
| 93 | } |
| 94 | |
| 95 | @Override |
| 96 | public Set<K> keySet() { |
| 97 | return null; |
| 98 | } |
| 99 | |
| 100 | @Override |
| 101 | public Collection<Versioned<V>> values() { |
| 102 | return null; |
| 103 | } |
| 104 | |
| 105 | @Override |
| 106 | public Set<Map.Entry<K, Versioned<V>>> entrySet() { |
| 107 | return null; |
| 108 | } |
| 109 | |
| 110 | @Override |
| 111 | public Versioned<V> putIfAbsent(K key, V value) { |
| 112 | return null; |
| 113 | } |
| 114 | |
| 115 | @Override |
| 116 | public boolean remove(K key, V value) { |
| 117 | return false; |
| 118 | } |
| 119 | |
| 120 | @Override |
| 121 | public boolean remove(K key, long version) { |
| 122 | return false; |
| 123 | } |
| 124 | |
| 125 | @Override |
| 126 | public boolean replace(K key, V oldValue, V newValue) { |
| 127 | return false; |
| 128 | } |
| 129 | |
| 130 | @Override |
| 131 | public boolean replace(K key, long oldVersion, V newValue) { |
| 132 | return false; |
| 133 | } |
| 134 | |
| 135 | @Override |
| 136 | public void addListener(MapEventListener<K, V> listener) { |
| 137 | |
| 138 | } |
| 139 | |
| 140 | @Override |
| 141 | public void removeListener(MapEventListener<K, V> listener) { |
| 142 | |
| 143 | } |
Madan Jampani | e106522 | 2015-08-17 16:21:51 -0700 | [diff] [blame] | 144 | |
| 145 | @Override |
| 146 | public Map<K, V> asJavaMap() { |
| 147 | return null; |
| 148 | } |
Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 149 | } |