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
8 package org.opendaylight.protocol.pcep.subobject;
10 import java.util.List;
12 import com.google.common.base.Objects.ToStringHelper;
14 public class EROExplicitExclusionRouteSubobject extends ExplicitRouteSubobject {
15 private final List<ExcludeRouteSubobject> xroSubobjets;
17 public EROExplicitExclusionRouteSubobject(List<ExcludeRouteSubobject> xroSubobjets) {
19 this.xroSubobjets = xroSubobjets;
22 public List<ExcludeRouteSubobject> getXroSubobjets() {
23 return this.xroSubobjets;
27 public int hashCode() {
29 int result = super.hashCode();
30 result = prime * result + ((this.xroSubobjets == null) ? 0 : this.xroSubobjets.hashCode());
35 public boolean equals(Object obj) {
38 if (!super.equals(obj))
40 if (this.getClass() != obj.getClass())
42 final EROExplicitExclusionRouteSubobject other = (EROExplicitExclusionRouteSubobject) obj;
43 if (this.xroSubobjets == null) {
44 if (other.xroSubobjets != null)
46 } else if (!this.xroSubobjets.equals(other.xroSubobjets))
52 protected ToStringHelper addToStringAttributes(ToStringHelper toStringHelper) {
53 toStringHelper.add("xroSubobjets", this.xroSubobjets);
54 return super.addToStringAttributes(toStringHelper);