1
/* Copyright (c) 2008, 2009 Netflix, Matthias Kaeppler
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
7
* http://www.apache.org/licenses/LICENSE-2.0
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
15
package oauth.signpost;
19
/** A name/value pair. */
20
public class Parameter implements Map.Entry<String, String> {
22
public Parameter(String key, String value) {
27
private final String key;
31
public String getKey() {
35
public String getValue() {
39
public String setValue(String value) {
48
public String toString() {
49
return getKey() + '=' + getValue();
53
public int hashCode() {
56
result = prime * result + ((key == null) ? 0 : key.hashCode());
57
result = prime * result + ((value == null) ? 0 : value.hashCode());
62
public boolean equals(Object obj) {
67
if (getClass() != obj.getClass())
69
final Parameter that = (Parameter) obj;
73
} else if (!key.equals(that.key))
76
if (that.value != null)
78
} else if (!value.equals(that.value))