home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / jmx.jar / javax / management / MBeanNotificationInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-10-28  |  1.3 KB  |  35 lines

  1. package javax.management;
  2.  
  3. import mx4j.util.Utils;
  4.  
  5. public class MBeanNotificationInfo extends MBeanFeatureInfo {
  6.    private static final long serialVersionUID = -3888371564530107064L;
  7.    private String[] types;
  8.  
  9.    public MBeanNotificationInfo(String[] notifsType, String name, String description) {
  10.       super(name, description);
  11.       this.types = notifsType == null ? new String[0] : notifsType;
  12.    }
  13.  
  14.    public String[] getNotifTypes() {
  15.       return this.types;
  16.    }
  17.  
  18.    public int hashCode() {
  19.       return super.hashCode() ^ Utils.arrayHashCode(this.getNotifTypes());
  20.    }
  21.  
  22.    public boolean equals(Object obj) {
  23.       if (!super.equals(obj)) {
  24.          return false;
  25.       } else {
  26.          try {
  27.             MBeanNotificationInfo other = (MBeanNotificationInfo)obj;
  28.             return Utils.arrayEquals(this.getNotifTypes(), other.getNotifTypes());
  29.          } catch (ClassCastException var3) {
  30.             return false;
  31.          }
  32.       }
  33.    }
  34. }
  35.