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;
24 public String getAttributeName() {
29 public boolean equals(Object o) {
33 if (o == null || getClass() != o.getClass()) {
37 JmxAttribute that = (JmxAttribute) o;
39 if (attributeName != null ? !attributeName.equals(that.attributeName)
40 : that.attributeName != null) {
48 public int hashCode() {
49 return attributeName != null ? attributeName.hashCode() : 0;
53 public String toString() {
54 return "JmxAttribute{'" + attributeName + "'}";