| 1199 | } |
| 1200 | |
| 1201 | private static class UnmodifiableMap<K, V> implements Map<K, V>, |
| 1202 | Serializable { |
| 1203 | private static final long serialVersionUID = -1034234728574286014L; |
| 1204 | |
| 1205 | private final Map<K, V> m; |
| 1206 | |
| 1207 | private static class UnmodifiableEntrySet<K, V> extends |
| 1208 | UnmodifiableSet<Map.Entry<K, V>> { |
| 1209 | private static final long serialVersionUID = 7854390611657943733L; |
| 1210 | |
| 1211 | private static class UnmodifiableMapEntry<K, V> implements |
| 1212 | Map.Entry<K, V> { |
| 1213 | Map.Entry<K, V> mapEntry; |
| 1214 | |
| 1215 | UnmodifiableMapEntry(Map.Entry<K, V> entry) { |
| 1216 | mapEntry = entry; |
| 1217 | } |
| 1218 | |
| 1219 | @Override |
| 1220 | public boolean equals(Object object) { |
| 1221 | return mapEntry.equals(object); |
| 1222 | } |
| 1223 | |
| 1224 | public K getKey() { |
| 1225 | return mapEntry.getKey(); |
| 1226 | } |
| 1227 | |
| 1228 | public V getValue() { |
| 1229 | return mapEntry.getValue(); |
| 1230 | } |
| 1231 | |
| 1232 | @Override |
| 1233 | public int hashCode() { |
| 1234 | return mapEntry.hashCode(); |
| 1235 | } |
| 1236 | |
| 1237 | public V setValue(V object) { |
| 1238 | throw new UnsupportedOperationException(); |
| 1239 | } |
| 1240 | |
| 1241 | @Override |
| 1242 | public String toString() { |
| 1243 | return mapEntry.toString(); |
| 1244 | } |
| 1245 | } |
| 1246 | |
| 1247 | UnmodifiableEntrySet(Set<Map.Entry<K, V>> set) { |
| 1248 | super(set); |
| 1249 | } |
| 1250 | |
| 1251 | @Override |
| 1252 | public Iterator<Map.Entry<K, V>> iterator() { |
| 1253 | return new Iterator<Map.Entry<K, V>>() { |
| 1254 | Iterator<Map.Entry<K, V>> iterator = c.iterator(); |
| 1255 | |
| 1256 | public boolean hasNext() { |
| 1257 | return iterator.hasNext(); |
| 1258 | } |
nothing calls this directly
no outgoing calls
no test coverage detected