@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TopicPartitionInfo that = (TopicPartitionInfo) o;

        return partition == that.partition &&
            Objects.equals(leader, that.leader) &&
            Objects.equals(replicas, that.replicas) &&
            Objects.equals(isr, that.isr) &&
            Objects.equals(elr, that.elr) &&
            Objects.equals(lastKnownElr, that.lastKnownElr);
    }
Return the last known eligible leader replicas of the partition. Note that the ordering of the result is unspecified.
clients/src/main/java/org/apache/kafka/common/TopicPartitionInfo.java