? EventProperties
java.lang.Object
org.osgi.service.event.EventProperties
The properties for an
Event
. An event source can create an
EventProperties object if it needs to reuse the same event properties for
multiple events.
The keys are all of type String
. The values are of type
Object
. The key "event.topics" is ignored as event topics
can only be set when an Event
is constructed.
Once constructed, an EventProperties object is unmodifiable. However, the values of the map used to construct an EventProperties object are still subject to modification as they are not deeply copied.
- ???????:
- 1.3
-
?????
-
?????
????????EventProperties
(Map<String, ?> properties) Create an EventProperties from the specified properties. -
????
??????????void
clear()
This method throwsUnsupportedOperationException
.boolean
containsKey
(Object name) Indicates if the specified property is present.boolean
containsValue
(Object value) Indicates if the specified value is present.entrySet()
Return the property entries.boolean
Compares thisEventProperties
object to another object.Return the value of the specified property.int
hashCode()
Returns a hash code value for this object.boolean
isEmpty()
Indicate if this properties is empty.keySet()
Return the names of the properties.This method throwsUnsupportedOperationException
.void
This method throwsUnsupportedOperationException
.This method throwsUnsupportedOperationException
.int
size()
Return the number of properties.toString()
Returns the string representation of this object.values()
Return the properties values.???????? java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
???????
-
EventProperties
Create an EventProperties from the specified properties.The specified properties will be copied into this EventProperties. Properties whose key is not of type
String
will be ignored. A property with the key "event.topics" will be ignored.- ??:
properties
- The properties to use for this EventProperties object (may benull
).
-
-
??????
-
clear
public void clear()This method throwsUnsupportedOperationException
.- ???:
clear
????Map<String,
Object> - ??:
UnsupportedOperationException
- if called.
-
containsKey
Indicates if the specified property is present.- ???:
containsKey
????Map<String,
Object> - ??:
name
- The property name.- ??:
true
If the property is present,false
otherwise.
-
containsValue
Indicates if the specified value is present.- ???:
containsValue
????Map<String,
Object> - ??:
value
- The property value.- ??:
true
If the value is present,false
otherwise.
-
entrySet
Return the property entries. -
get
Return the value of the specified property. -
isEmpty
public boolean isEmpty()Indicate if this properties is empty. -
keySet
Return the names of the properties. -
put
This method throwsUnsupportedOperationException
.- ???:
put
????Map<String,
Object> - ??:
UnsupportedOperationException
- if called.
-
putAll
This method throwsUnsupportedOperationException
.- ???:
putAll
????Map<String,
Object> - ??:
UnsupportedOperationException
- if called.
-
remove
This method throwsUnsupportedOperationException
.- ???:
remove
????Map<String,
Object> - ??:
UnsupportedOperationException
- if called.
-
size
public int size()Return the number of properties. -
values
Return the properties values. -
equals
Compares thisEventProperties
object to another object.The properties are compared using the
java.util.Map.equals()
rules which includes identity comparison for array values. -
hashCode
public int hashCode()Returns a hash code value for this object. -
toString
Returns the string representation of this object.
-