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.yangtools.binding.generator.util.generated.type.builder;
10 import java.util.Objects;
11 import org.opendaylight.yangtools.sal.binding.model.api.MethodSignature.Parameter;
12 import org.opendaylight.yangtools.sal.binding.model.api.Type;
15 * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.util.generated.type.builder.MethodParameterImpl} instead.
18 final class MethodParameterImpl implements Parameter {
20 private final String name;
21 private final Type type;
23 public MethodParameterImpl(final String name, final Type type) {
30 public String getName() {
35 public Type getType() {
42 * @see java.lang.Object#hashCode()
45 public int hashCode() {
48 result = prime * result + Objects.hashCode(name);
49 result = prime * result + Objects.hashCode(type);
56 * @see java.lang.Object#equals(java.lang.Object)
59 public boolean equals(final Object obj) {
66 if (getClass() != obj.getClass()) {
69 MethodParameterImpl other = (MethodParameterImpl) obj;
70 return Objects.equals(name, other.name) && Objects.equals(type, other.type);
76 * @see java.lang.Object#toString()
79 public String toString() {
80 StringBuilder builder = new StringBuilder();
81 builder.append("MethodParameter [name=");
83 builder.append(", type=");
84 builder.append(type.getPackageName());
86 builder.append(type.getName());
88 return builder.toString();