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