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
9 package org.opendaylight.protocol.pcep.subobject;
11 import com.google.common.base.Objects.ToStringHelper;
14 * Structure of Type 1 Label subobject
16 * @see <a href="http://tools.ietf.org/html/rfc3209#section-4.1">4.1. Label
19 public class RROType1LabelSubobject extends RROLabelSubobject {
21 private final long label;
23 public RROType1LabelSubobject(long label, boolean upStream) {
28 public long getLabel() {
33 public int hashCode() {
35 int result = super.hashCode();
36 result = prime * result + (int) (this.label ^ (this.label >>> 32));
41 public boolean equals(Object obj) {
44 if (!super.equals(obj))
46 if (this.getClass() != obj.getClass())
48 final RROType1LabelSubobject other = (RROType1LabelSubobject) obj;
49 if (this.label != other.label)
55 protected ToStringHelper addToStringAttributes(ToStringHelper toStringHelper) {
56 toStringHelper.add("label", this.label);
57 return super.addToStringAttributes(toStringHelper);