void handleTopicChange(TopicImage prev, TopicDelta topicDelta) {
        if (prev == null) {
            globalTopicsChange++;
            for (PartitionRegistration nextPartition : topicDelta.partitionChanges().values()) {
                handlePartitionChange(null, nextPartition);
            }
        } else {
            for (Entry<Integer, PartitionRegistration> entry : topicDelta.partitionChanges().entrySet()) {
                int partitionId = entry.getKey();
                PartitionRegistration nextPartition = entry.getValue();
                handlePartitionChange(prev.partitions().get(partitionId), nextPartition);
            }
        }
    }
Calculates the change between two boolean values, expressed as an integer.
metadata/src/main/java/org/apache/kafka/controller/metrics/ControllerMetricsChanges.java