1 22 package org.jboss.jmx.adaptor.model; 23 24 import java.util.Arrays ; 25 import java.util.TreeSet ; 26 import javax.management.MBeanInfo ; 27 import javax.management.ObjectName ; 28 29 34 public class DomainData 35 { 36 String domainName; 37 TreeSet domainData = new TreeSet (); 38 39 40 public DomainData(String domainName) 41 { 42 this.domainName = domainName; 43 } 44 public DomainData(String domainName, MBeanData[] data) 45 { 46 this.domainName = domainName; 47 domainData.addAll(Arrays.asList(data)); 48 } 49 50 public int hashCode() 51 { 52 return domainName.hashCode(); 53 } 54 public boolean equals(Object obj) 55 { 56 DomainData data = (DomainData) obj; 57 return domainName.equals(data.domainName); 58 } 59 60 public String getDomainName() 61 { 62 return domainName; 63 } 64 public MBeanData[] getData() 65 { 66 MBeanData[] data = new MBeanData[domainData.size()]; 67 domainData.toArray(data); 68 return data; 69 } 70 public void addData(MBeanData data) 71 { 72 domainData.add(data); 73 } 74 } 75 | Popular Tags |