3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.sal.core;
12 import javax.xml.bind.annotation.XmlElement;
13 import javax.xml.bind.annotation.XmlRootElement;
16 * The class represents the Tier property of a node
21 @SuppressWarnings("serial")
22 public class Tier extends Property {
23 @XmlElement(name="value")
24 private int tierValue;
25 public static final String TierPropName = "tier";
27 public Tier(int tier) {
29 this.tierValue = tier;
33 * Private constructor used for JAXB mapping
42 return new Tier(this.tierValue);
45 public int getValue() {
46 return this.tierValue;
50 public int hashCode() {
52 int result = super.hashCode();
53 result = prime * result + tierValue;
58 public boolean equals(Object obj) {
61 if (!super.equals(obj))
63 if (getClass() != obj.getClass())
65 Tier other = (Tier) obj;
66 if (tierValue != other.tierValue)
72 public String toString() {
73 return "Tier[" + tierValue + "]";