@Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            DefaultPartitionView that = (DefaultPartitionView) o;
            return Objects.equals(replicas, that.replicas) &&
                    Objects.equals(leader, that.leader);
        }
View of a partition used by {@link ReplicaSelector} to determine a preferred replica.
clients/src/main/java/org/apache/kafka/common/replica/PartitionView.java