import java.util.Arrays;
import java.util.Base64;
-public abstract class GroupId {
+public abstract sealed class GroupId permits GroupIdV1, GroupIdV2 {
private final byte[] id;
}
}
- public GroupId(final byte[] id) {
+ protected GroupId(final byte[] id) {
this.id = id;
}
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
- final GroupId groupId = (GroupId) o;
+ final var groupId = (GroupId) o;
return Arrays.equals(id, groupId.id);
}