Added removeAttribute() and removeProperty() methods (INT-203, INT-204).
This commit is contained in:
@@ -125,6 +125,10 @@ public class MessageHeader implements Serializable {
|
||||
return (String) this.properties.setProperty(key, value);
|
||||
}
|
||||
|
||||
public String removeProperty(String key) {
|
||||
return (String) this.properties.remove(key);
|
||||
}
|
||||
|
||||
public Set<String> getPropertyNames() {
|
||||
Set<String> propertyNames = new HashSet<String>();
|
||||
for (Object key : this.properties.keySet()) {
|
||||
@@ -145,6 +149,10 @@ public class MessageHeader implements Serializable {
|
||||
return this.attributes.putIfAbsent(key, value);
|
||||
}
|
||||
|
||||
public Object removeAttribute(String key) {
|
||||
return this.attributes.remove(key);
|
||||
}
|
||||
|
||||
public Set<String> getAttributeNames() {
|
||||
return this.attributes.keySet();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user