com.pamirs.pradar.cache.ClusterTestCacheWrapperKey Maven / Gradle / Ivy
package com.pamirs.pradar.cache;
import java.io.Serializable;
/**
* @author xiaobin.zfb|[email protected]
* @since 2020/12/30 4:40 下午
*/
public class ClusterTestCacheWrapperKey implements Serializable {
private final static long serialVersionUID = 1L;
private Object key;
public ClusterTestCacheWrapperKey(Object key) {
this.key = key;
}
public Object getKey() {
return key;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ClusterTestCacheWrapperKey that = (ClusterTestCacheWrapperKey) o;
return key != null ? key.equals(that.key) : that.key == null;
}
@Override
public int hashCode() {
return key != null ? key.hashCode() : 0;
}
@Override
public String toString() {
if (null != key) {
return key.toString();
}
return null;
}
}