This commit is contained in:
Gary Gregory 2024-06-24 07:55:22 -04:00
parent 38963b1de8
commit a2dac490ec
7 changed files with 42 additions and 3 deletions

View File

@ -49,12 +49,16 @@ import java.util.function.Supplier;
* the {@code target} filter.</li> * the {@code target} filter.</li>
* </ol> * </ol>
* *
*
* @param <T> the {@link BloomFilter} type.
* @since 4.5.0 * @since 4.5.0
*/ */
public class LayerManager<T extends BloomFilter> implements BloomFilterExtractor { public class LayerManager<T extends BloomFilter> implements BloomFilterExtractor {
/** /**
* Builder to create Layer Manager * Builder to create Layer Manager.
*
* @param <T> the {@link BloomFilter} type.
*/ */
public static class Builder<T extends BloomFilter> { public static class Builder<T extends BloomFilter> {
private Predicate<LayerManager<T>> extendCheck; private Predicate<LayerManager<T>> extendCheck;

View File

@ -404,6 +404,9 @@ public abstract class AbstractLinkedList<E> implements List<E> {
* <p> * <p>
* From Commons Collections 3.1, all access to the {@code value} property * From Commons Collections 3.1, all access to the {@code value} property
* is via the methods on this class. * is via the methods on this class.
* </p>
*
* @param <E> The node value type.
*/ */
protected static class Node<E> { protected static class Node<E> {

View File

@ -70,6 +70,9 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
/** /**
* EntrySet iterator. * EntrySet iterator.
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
protected static class EntrySetIterator<K, V> extends LinkIterator<K, V> implements protected static class EntrySetIterator<K, V> extends LinkIterator<K, V> implements
OrderedIterator<Map.Entry<K, V>>, ResettableIterator<Map.Entry<K, V>> { OrderedIterator<Map.Entry<K, V>>, ResettableIterator<Map.Entry<K, V>> {
@ -91,6 +94,8 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
/** /**
* KeySet iterator. * KeySet iterator.
*
* @param <K> the key type.
*/ */
protected static class KeySetIterator<K> extends LinkIterator<K, Object> implements protected static class KeySetIterator<K> extends LinkIterator<K, Object> implements
OrderedIterator<K>, ResettableIterator<K> { OrderedIterator<K>, ResettableIterator<K> {
@ -118,6 +123,10 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
* then you will not be able to access the protected fields. * then you will not be able to access the protected fields.
* The {@code entryXxx()} methods on {@code AbstractLinkedMap} exist * The {@code entryXxx()} methods on {@code AbstractLinkedMap} exist
* to provide the necessary access. * to provide the necessary access.
* </p>
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
protected static class LinkEntry<K, V> extends HashEntry<K, V> { protected static class LinkEntry<K, V> extends HashEntry<K, V> {
/** The entry before this one in the order */ /** The entry before this one in the order */
@ -140,6 +149,9 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
/** /**
* Base Iterator that iterates in link order. * Base Iterator that iterates in link order.
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
protected abstract static class LinkIterator<K, V> { protected abstract static class LinkIterator<K, V> {
@ -223,6 +235,9 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
/** /**
* MapIterator implementation. * MapIterator implementation.
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
protected static class LinkMapIterator<K, V> extends LinkIterator<K, V> implements protected static class LinkMapIterator<K, V> extends LinkIterator<K, V> implements
OrderedMapIterator<K, V>, ResettableIterator<K> { OrderedMapIterator<K, V>, ResettableIterator<K> {
@ -271,6 +286,8 @@ public abstract class AbstractLinkedMap<K, V> extends AbstractHashedMap<K, V> im
/** /**
* Values iterator. * Values iterator.
*
* @param <V> the value type.
*/ */
protected static class ValuesIterator<V> extends LinkIterator<Object, V> implements protected static class ValuesIterator<V> extends LinkIterator<Object, V> implements
OrderedIterator<V>, ResettableIterator<V> { OrderedIterator<V>, ResettableIterator<V> {

View File

@ -972,7 +972,10 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
} }
/** /**
* A {@link org.apache.commons.collections4.Trie} is a set of {@link TrieEntry} nodes. * A {@link org.apache.commons.collections4.Trie} is a set of {@link TrieEntry} nodes.
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
protected static class TrieEntry<K, V> extends BasicEntry<K, V> { protected static class TrieEntry<K, V> extends BasicEntry<K, V> {

View File

@ -30,6 +30,9 @@ import org.junit.jupiter.api.Test;
/** /**
* Abstract test class for {@link IterableMap} methods and contracts. * Abstract test class for {@link IterableMap} methods and contracts.
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
public abstract class AbstractIterableMapTest<K, V> extends AbstractMapTest<K, V> { public abstract class AbstractIterableMapTest<K, V> extends AbstractMapTest<K, V> {

View File

@ -120,6 +120,9 @@ import org.junit.jupiter.api.Test;
* If your {@link Map} fails one of these tests by design, you may still use this base set of cases. Simply override the test case (method) your map fails * If your {@link Map} fails one of these tests by design, you may still use this base set of cases. Simply override the test case (method) your map fails
* and/or the methods that define the assumptions used by the test cases. For example, if your map does not allow duplicate values, override * and/or the methods that define the assumptions used by the test cases. For example, if your map does not allow duplicate values, override
* {@link #isAllowDuplicateValues()} and have it return {@code false} * {@link #isAllowDuplicateValues()} and have it return {@code false}
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
public abstract class AbstractMapTest<K, V> extends AbstractObjectTest { public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
@ -489,6 +492,9 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
/** /**
* Creates a new Map Entry that is independent of the first and the map. * Creates a new Map Entry that is independent of the first and the map.
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
public static <K, V> Map.Entry<K, V> cloneMapEntry(final Map.Entry<K, V> entry) { public static <K, V> Map.Entry<K, V> cloneMapEntry(final Map.Entry<K, V> entry) {
final HashMap<K, V> map = new HashMap<>(); final HashMap<K, V> map = new HashMap<>();

View File

@ -47,7 +47,10 @@ public class IdentityMap<K, V>
extends AbstractHashedMap<K, V> implements Serializable, Cloneable { extends AbstractHashedMap<K, V> implements Serializable, Cloneable {
/** /**
* HashEntry * HashEntry.
*
* @param <K> the key type.
* @param <V> the value type.
*/ */
protected static class IdentityEntry<K, V> extends HashEntry<K, V> { protected static class IdentityEntry<K, V> extends HashEntry<K, V> {