1 package org.testng.internal;
2 
3 import org.testng.IAttributes;
4 import org.testng.collections.Maps;
5 
6 import java.util.Map;
7 import java.util.Set;
8 
9 /**
10  * Simple implementation of IAttributes.
11  *
12  * @author cbeust@google.com (Cedric Beust), March 16th, 2010
13  */
14 public 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
getAttribute(String name)22   public Object getAttribute(String name) {
23     return m_attributes.get(name);
24   }
25 
26   @Override
getAttributeNames()27   public Set<String> getAttributeNames() {
28     return m_attributes.keySet();
29   }
30 
31   @Override
setAttribute(String name, Object value)32   public void setAttribute(String name, Object value) {
33     m_attributes.put(name, value);
34   }
35 
36   @Override
removeAttribute(String name)37   public Object removeAttribute(String name) {
38     return m_attributes.remove(name);
39   }
40 }
41