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");
20 this.attributeName = attributeName;
23 public String getAttributeName() {
28 public boolean equals(Object o) {
31 if (o == null || getClass() != o.getClass())
34 JmxAttribute that = (JmxAttribute) o;
36 if (attributeName != null ? !attributeName.equals(that.attributeName)
37 : that.attributeName != null)
44 public int hashCode() {
45 return attributeName != null ? attributeName.hashCode() : 0;
49 public String toString() {
50 return "JmxAttribute{'" + attributeName + "'}";