Class ReadOnlyDictionary
- All Implemented Interfaces:
Comparable<ReadOnlyDictionary>, Map<String,Object>
public class ReadOnlyDictionary
extends Dictionary<String,Object>
implements Map<String,Object>, Comparable<ReadOnlyDictionary>
The
ReadOnlyDictionary is both a Dictionary and
a Map whose modification methods (like Dictionary.put(Object, Object),
remove(Object), etc.) throw an UnsupportedOperationException.-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.osgi.framework.ServiceReference<?> -
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyDictionary(Map<String, Object> delegate) Creates a wrapper for the given delegate dictionary providing read only access to the data.ReadOnlyDictionary(org.osgi.framework.ServiceReference<?> serviceReference) Creates a wrapper for the given service reference providing read only access to the reference properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intbooleancontainsKey(Object key) booleancontainsValue(Object value) elements()entrySet()booleanisEmpty()keys()keySet()This method has no effect and always returnsnullas this instance is read-only and cannot modify and properties.voidThis method has no effect and always returnsnullas this instance is read-only and cannot modify and properties.intsize()toString()values()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
m_delegate
-
m_serviceReference
private final org.osgi.framework.ServiceReference<?> m_serviceReference
-
-
Constructor Details
-
ReadOnlyDictionary
-
ReadOnlyDictionary
public ReadOnlyDictionary(org.osgi.framework.ServiceReference<?> serviceReference) Creates a wrapper for the given service reference providing read only access to the reference properties.
-
-
Method Details
-
elements
- Specified by:
elementsin classDictionary<String,Object>
-
get
-
isEmpty
-
keys
- Specified by:
keysin classDictionary<String,Object>
-
put
-
remove
-
size
-
toString
-
clear
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
entrySet
-
keySet
-
putAll
-
values
-
compareTo
- Specified by:
compareToin interfaceComparable<ReadOnlyDictionary>
-