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;
17 private final short type;
18 private final short value;
20 PCEPErrorIdentifier(final short type, final short value) {
25 public short getType() {
29 public short getValue() {
34 public int hashCode() {
37 result = prime * result + this.type;
38 result = prime * result + this.value;
43 public boolean equals(final java.lang.Object obj) {
47 if (obj == null || this.getClass() != obj.getClass()) {
50 final PCEPErrorIdentifier other = (PCEPErrorIdentifier) obj;
51 if (this.type != other.type || this.value != other.value) {
58 public String toString() {
59 return "type " + this.type + " value " + this.value;