diff --git a/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java b/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java index efd1e48..d5d0fd3 100644 --- a/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java +++ b/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java @@ -6,10 +6,24 @@ package eu.m724.tweaks.updater.cache; +import java.util.Objects; + public record ResourceVersion( int resourceId, int page, int updateId, String label, UpdateDescription description -) { } +) { + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ResourceVersion that)) return false; + return updateId == that.updateId && resourceId == that.resourceId; + } + + @Override + public int hashCode() { + return Objects.hash(resourceId, updateId); + } +}