2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.config.api;
11 * Wrapper around strings to make {@link JmxAttributeValidationException} type
14 public class JmxAttribute {
15 private final String attributeName;
17 public JmxAttribute(String attributeName) {
18 if (attributeName == null) {
19 throw new NullPointerException("Parameter 'attributeName' is null");
21 this.attributeName = attributeName;
25 * Name of attribute in JMX.
27 public String getAttributeName() {
32 public boolean equals(Object o) {
36 if (o == null || getClass() != o.getClass()) {
40 JmxAttribute that = (JmxAttribute) o;
42 if (attributeName != null ? !attributeName.equals(that.attributeName)
43 : that.attributeName != null) {
51 public int hashCode() {
52 return attributeName != null ? attributeName.hashCode() : 0;
56 public String toString() {
57 return "JmxAttribute{'" + attributeName + "'}";