2 * Copyright (c) 2014 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.protocol.pcep.spi;
10 import java.io.Serializable;
13 * Caret for combination of Error-type and Error-value.
15 final class PCEPErrorIdentifier implements Serializable {
16 private static final long serialVersionUID = 2434590156751699872L;
18 // FIXME: these should be Uint8s
19 private final short type;
20 private final short value;
22 PCEPErrorIdentifier(final short type, final short value) {
27 public short getType() {
31 public short getValue() {
36 public int hashCode() {
39 result = prime * result + this.type;
40 result = prime * result + this.value;
45 public boolean equals(final java.lang.Object obj) {
49 if (obj == null || this.getClass() != obj.getClass()) {
52 final PCEPErrorIdentifier other = (PCEPErrorIdentifier) obj;
53 return this.type == other.type && this.value == other.value;
57 public String toString() {
58 return "type " + this.type + " value " + this.value;