io.quarkus.redis.datasource.list.KeyValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
package io.quarkus.redis.datasource.list;
import java.util.Objects;
public class KeyValue {
public final K key;
public final V value;
public KeyValue(K key, V value) {
this.key = key;
this.value = value;
}
public static KeyValue of(K key, V value) {
return new KeyValue<>(key, value);
}
public K key() {
return key;
}
public V value() {
return value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
KeyValue, ?> keyValue = (KeyValue, ?>) o;
return key.equals(keyValue.key) && Objects.equals(value, keyValue.value);
}
@Override
public int hashCode() {
return Objects.hash(key, value);
}
@Override
public String toString() {
return "KeyValue{" +
"key=" + key +
", value=" + value +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy