cloud.eppo.cache.VariationCacheValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-common-jvm Show documentation
Show all versions of sdk-common-jvm Show documentation
Eppo SDK for JVM shared library
package cloud.eppo.cache;
import java.util.Objects;
public class VariationCacheValue implements AssignmentCacheValue {
private final String allocationKey;
private final String variationKey;
public VariationCacheValue(String allocationKey, String variationKey) {
this.allocationKey = allocationKey;
this.variationKey = variationKey;
}
@Override
public String getValueIdentifier() {
return allocationKey + ";" + variationKey;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
VariationCacheValue that = (VariationCacheValue) o;
return Objects.equals(allocationKey, that.allocationKey)
&& Objects.equals(variationKey, that.variationKey);
}
@Override
public int hashCode() {
return Objects.hash(allocationKey, variationKey);
}
}