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) {
25 public String getName() {
30 public Type getType() {
37 * @see java.lang.Object#hashCode()
40 public int hashCode() {
43 result = (prime * result) + Objects.hashCode(this.name);
44 result = (prime * result) + Objects.hashCode(this.type);
51 * @see java.lang.Object#equals(java.lang.Object)
54 public boolean equals(final Object obj) {
61 if (getClass() != obj.getClass()) {
64 final MethodParameterImpl other = (MethodParameterImpl) obj;
65 return Objects.equals(this.name, other.name) && Objects.equals(this.type, other.type);
71 * @see java.lang.Object#toString()
74 public String toString() {
75 final StringBuilder builder = new StringBuilder();
76 builder.append("MethodParameter [name=");
77 builder.append(this.name);
78 builder.append(", type=");
79 builder.append(this.type.getPackageName());
81 builder.append(this.type.getName());
83 return builder.toString();