<commit_before>/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.collections4.bloomfilter;

import java.util.BitSet;
import java.util.PrimitiveIterator.OfInt;

import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity;
import org.apache.commons.collections4.bloomfilter.hasher.Hasher;
import org.apache.commons.collections4.bloomfilter.hasher.Shape;
import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;

/**
 * An abstract Bloom filter providing default implementations for most Bloom filter
 * functions. Specific implementations are encouraged to override the methods that can be
 * more efficiently implemented.
 * <p>
 * This abstract class provides additional functionality not declared in the interface.
 * Specifically:
 * <ul>
 * <li>orCardinality</li>
 * <li>jaccardSimilarity</li>
 * <li>jaccardDistance</li>
 * <li>cosineSimilarity</li>
 * <li>cosineDistance</li>
 * <li>estimateSize</li>
 * <li>estimateUnionSize</li>
 * <li>estimateIntersectionSize</li>
 * <li>isFull</li>
 * </ul>
 *
 * @since 4.5
 */
public abstract class AbstractBloomFilter implements BloomFilter {

    /**
     * The shape used by this BloomFilter
     */
    private final Shape shape;

    /**
     * Construct a Bloom filter with the specified shape.
     *
     * @param shape The shape.
     */
    protected AbstractBloomFilter(final Shape shape) {
        this.shape = shape;
    }

    /**
     * Performs a logical "AND" with the other Bloom filter and returns the cardinality of
     * the result.
     *
     * @param other the other Bloom filter.
     * @return the cardinality of the result of {@code ( this AND other )}.
     */
    @Override
    public int andCardinality(final BloomFilter other) {<commit_msg>Remove methods from the javadoc that are not implemented.<commit_after>/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.collections4.bloomfilter;

import java.util.BitSet;
import java.util.PrimitiveIterator.OfInt;

import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity;
import org.apache.commons.collections4.bloomfilter.hasher.Hasher;
import org.apache.commons.collections4.bloomfilter.hasher.Shape;
import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;

/**
 * An abstract Bloom filter providing default implementations for most Bloom filter
 * functions. Specific implementations are encouraged to override the methods that can be
 * more efficiently implemented.
 * <p>
 * This abstract class provides additional functionality not declared in the interface.
 * Specifically:
 * <ul>
 * <li>{@link #isFull()}</li>
 * </ul>
 *
 * @since 4.5
 */
public abstract class AbstractBloomFilter implements BloomFilter {

    /**
     * The shape used by this BloomFilter
     */
    private final Shape shape;

    /**
     * Construct a Bloom filter with the specified shape.
     *
     * @param shape The shape.
     */
    protected AbstractBloomFilter(final Shape shape) {
        this.shape = shape;
    }

    /**
     * Performs a logical "AND" with the other Bloom filter and returns the cardinality of
     * the result.
     *
     * @param other the other Bloom filter.
     * @return the cardinality of the result of {@code ( this AND other )}.
     */
    @Override
    public int andCardinality(final BloomFilter other) {
{'fraction_non_alphanumeric': 0.08321406665303618, 'fraction_numerical': 0.004498057656920875, 'mean_word_length': 3.654614652711703, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1922510', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1277, 'n_words': 505}