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.mdsal.binding.model.util.generated.type.builder;
10 import java.util.Objects;
11 import org.opendaylight.mdsal.binding.model.api.MethodSignature.Parameter;
12 import org.opendaylight.mdsal.binding.model.api.Type;
14 final class MethodParameterImpl implements Parameter {
16 private final String name;
17 private final Type type;
19 public MethodParameterImpl(final String name, final Type type) {
26 public String getName() {
31 public Type getType() {
38 * @see java.lang.Object#hashCode()
41 public int hashCode() {
44 result = (prime * result) + Objects.hashCode(this.name);
45 result = (prime * result) + Objects.hashCode(this.type);
52 * @see java.lang.Object#equals(java.lang.Object)
55 public boolean equals(final Object obj) {
62 if (getClass() != obj.getClass()) {
65 final MethodParameterImpl other = (MethodParameterImpl) obj;
66 return Objects.equals(this.name, other.name) && Objects.equals(this.type, other.type);
72 * @see java.lang.Object#toString()
75 public String toString() {
76 final StringBuilder builder = new StringBuilder();
77 builder.append("MethodParameter [name=");
78 builder.append(this.name);
79 builder.append(", type=");
80 builder.append(this.type.getPackageName());
82 builder.append(this.type.getName());
84 return builder.toString();