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.tlv;
11 import org.opendaylight.protocol.pcep.PCEPTlv;
14 * Structure of LSP State DB Version TLV.
17 * href="http://tools.ietf.org/html/draft-crabbe-pce-stateful-pce-02#section-7.1.2">LSP
18 * State Database Version TLV</a>
20 public class LSPStateDBVersionTlv implements PCEPTlv {
21 private static final long serialVersionUID = 3165807743418210453L;
22 private final long dbVersion;
25 * Construct new LSP State DB Version TLV.
30 public LSPStateDBVersionTlv(long dbVersion) {
31 this.dbVersion = dbVersion;
35 * Gets long representation of DB Version.
39 public long getDbVersion() {
40 return this.dbVersion;
44 public int hashCode() {
47 result = prime * result + (int) (this.dbVersion ^ (this.dbVersion >>> 32));
52 public boolean equals(Object obj) {
57 if (this.getClass() != obj.getClass())
59 final LSPStateDBVersionTlv other = (LSPStateDBVersionTlv) obj;
60 if (this.dbVersion != other.dbVersion)
66 public String toString() {
67 final StringBuilder builder = new StringBuilder();
68 builder.append("LSPStateDBVersionTlv [dbVersion=");
69 builder.append(this.dbVersion);
71 return builder.toString();