blob: 55fd834aec11ac61b926074c7e267214f0335874 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package org.testng.internal;
import org.testng.IAttributes;
import org.testng.collections.Maps;
import java.util.Map;
import java.util.Set;
/**
* Simple implementation of IAttributes.
*
* @author cbeust@google.com (Cedric Beust), March 16th, 2010
*/
public class Attributes implements IAttributes {
/**
*
*/
private static final long serialVersionUID = 6701159979281335152L;
private Map<String, Object> m_attributes = Maps.newHashMap();
@Override
public Object getAttribute(String name) {
return m_attributes.get(name);
}
@Override
public Set<String> getAttributeNames() {
return m_attributes.keySet();
}
@Override
public void setAttribute(String name, Object value) {
m_attributes.put(name, value);
}
@Override
public Object removeAttribute(String name) {
return m_attributes.remove(name);
}
}
|