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 {
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
41 return new Tier(this.tierValue);
44 public int getValue() {
45 return this.tierValue;
49 public int hashCode() {
51 int result = super.hashCode();
52 result = prime * result + tierValue;
57 public boolean equals(Object obj) {
60 if (!super.equals(obj))
62 if (getClass() != obj.getClass())
64 Tier other = (Tier) obj;
65 if (tierValue != other.tierValue)
71 public String toString() {
72 return "Tier[" + tierValue + "]";