public static boolean contains(int[] replicas, int value) {
        for (int replica : replicas) {
            if (replica == value) return true;
        }
        return false;
    }
Returns true if an array of replicas contains a specific value.

@param replicas      The replica array.
@param value         The value to look for.

@return              True only if the value is found in the array.
metadata/src/main/java/org/apache/kafka/metadata/Replicas.java