package com.qianwen.core.tool.tuple;
|
|
import java.io.Serializable;
|
import com.qianwen.core.tool.utils.StringPool;
|
|
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/tuple/NameValue.class */
|
public class NameValue<T extends Serializable> implements Serializable {
|
private static final long serialVersionUID = 1;
|
private String name;
|
private T value;
|
|
public void setName(final String name) {
|
this.name = name;
|
}
|
|
public void setValue(final T value) {
|
this.value = value;
|
}
|
|
public boolean equals(final Object o) {
|
if (o == this) {
|
return true;
|
}
|
if (o instanceof NameValue) {
|
NameValue<?> other = (NameValue) o;
|
if (other.canEqual(this)) {
|
Object this$name = getName();
|
Object other$name = other.getName();
|
if (this$name == null) {
|
if (other$name != null) {
|
return false;
|
}
|
} else if (!this$name.equals(other$name)) {
|
return false;
|
}
|
Object this$value = getValue();
|
Object other$value = other.getValue();
|
return this$value == null ? other$value == null : this$value.equals(other$value);
|
}
|
return false;
|
}
|
return false;
|
}
|
|
protected boolean canEqual(final Object other) {
|
return other instanceof NameValue;
|
}
|
|
public int hashCode() {
|
Object $name = getName();
|
int result = (1 * 59) + ($name == null ? 43 : $name.hashCode());
|
Object $value = getValue();
|
return (result * 59) + ($value == null ? 43 : $value.hashCode());
|
}
|
|
public String toString() {
|
return "NameValue(name=" + getName() + ", value=" + getValue() + StringPool.RIGHT_BRACKET;
|
}
|
|
public NameValue(final String name, final T value) {
|
this.name = name;
|
this.value = value;
|
}
|
|
public NameValue() {
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
public T getValue() {
|
return this.value;
|
}
|
}
|