public boolean equals(final Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            final LocalAssignment that = (LocalAssignment) o;
            return localEpoch == that.localEpoch && Objects.equals(partitions, that.partitions);
        }
A data structure to represent the current assignment, and current target assignment of a member in a consumer group.

Besides the assigned partitions, it contains a local epoch that is bumped whenever the assignment changes, to ensure
that two assignments with the same partitions but different local epochs are not considered equal.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManager.java