From a2dac490ece6f6a3a8dc7091c18318826f63a5ce Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 24 Jun 2024 07:55:22 -0400 Subject: [PATCH] Javadoc --- .../collections4/bloomfilter/LayerManager.java | 6 +++++- .../collections4/list/AbstractLinkedList.java | 3 +++ .../collections4/map/AbstractLinkedMap.java | 17 +++++++++++++++++ .../collections4/trie/AbstractPatriciaTrie.java | 5 ++++- .../map/AbstractIterableMapTest.java | 3 +++ .../collections4/map/AbstractMapTest.java | 6 ++++++ .../commons/collections4/map/IdentityMap.java | 5 ++++- 7 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java b/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java index b1300136f6..574a92cfb0 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/LayerManager.java @@ -49,12 +49,16 @@ * the {@code target} filter. * * + * + * @param the {@link BloomFilter} type. * @since 4.5.0 */ public class LayerManager implements BloomFilterExtractor { /** - * Builder to create Layer Manager + * Builder to create Layer Manager. + * + * @param the {@link BloomFilter} type. */ public static class Builder { private Predicate> extendCheck; diff --git a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java index 1d66a792fa..95b271c934 100644 --- a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java +++ b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java @@ -404,6 +404,9 @@ public void remove() { *

* From Commons Collections 3.1, all access to the {@code value} property * is via the methods on this class. + *

+ * + * @param The node value type. */ protected static class Node { diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java index 0a858ca79e..4c4cd71c9e 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java @@ -70,6 +70,9 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * EntrySet iterator. + * + * @param the key type. + * @param the value type. */ protected static class EntrySetIterator extends LinkIterator implements OrderedIterator>, ResettableIterator> { @@ -91,6 +94,8 @@ public Map.Entry previous() { /** * KeySet iterator. + * + * @param the key type. */ protected static class KeySetIterator extends LinkIterator implements OrderedIterator, ResettableIterator { @@ -118,6 +123,10 @@ public K previous() { * then you will not be able to access the protected fields. * The {@code entryXxx()} methods on {@code AbstractLinkedMap} exist * to provide the necessary access. + *

+ * + * @param the key type. + * @param the value type. */ protected static class LinkEntry extends HashEntry { /** The entry before this one in the order */ @@ -140,6 +149,9 @@ protected LinkEntry(final HashEntry next, final int hashCode, final Object /** * Base Iterator that iterates in link order. + * + * @param the key type. + * @param the value type. */ protected abstract static class LinkIterator { @@ -223,6 +235,9 @@ public String toString() { /** * MapIterator implementation. + * + * @param the key type. + * @param the value type. */ protected static class LinkMapIterator extends LinkIterator implements OrderedMapIterator, ResettableIterator { @@ -271,6 +286,8 @@ public V setValue(final V value) { /** * Values iterator. + * + * @param the value type. */ protected static class ValuesIterator extends LinkIterator implements OrderedIterator, ResettableIterator { diff --git a/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java b/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java index 85af6136f0..ea3d3801ac 100644 --- a/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java +++ b/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java @@ -972,7 +972,10 @@ public void set(final E item) { } /** - * 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 the key type. + * @param the value type. */ protected static class TrieEntry extends BasicEntry { diff --git a/src/test/java/org/apache/commons/collections4/map/AbstractIterableMapTest.java b/src/test/java/org/apache/commons/collections4/map/AbstractIterableMapTest.java index 68bc2e32de..78ca9b0e39 100644 --- a/src/test/java/org/apache/commons/collections4/map/AbstractIterableMapTest.java +++ b/src/test/java/org/apache/commons/collections4/map/AbstractIterableMapTest.java @@ -30,6 +30,9 @@ /** * Abstract test class for {@link IterableMap} methods and contracts. + * + * @param the key type. + * @param the value type. */ public abstract class AbstractIterableMapTest extends AbstractMapTest { diff --git a/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java b/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java index 5a845ae775..6ecbb3ec52 100644 --- a/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java +++ b/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java @@ -120,6 +120,9 @@ * 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 * {@link #isAllowDuplicateValues()} and have it return {@code false} + * + * @param the key type. + * @param the value type. */ public abstract class AbstractMapTest extends AbstractObjectTest { @@ -489,6 +492,9 @@ public void verify() { /** * Creates a new Map Entry that is independent of the first and the map. + * + * @param the key type. + * @param the value type. */ public static Map.Entry cloneMapEntry(final Map.Entry entry) { final HashMap map = new HashMap<>(); diff --git a/src/test/java/org/apache/commons/collections4/map/IdentityMap.java b/src/test/java/org/apache/commons/collections4/map/IdentityMap.java index d72e1ae47f..9d67084eb1 100644 --- a/src/test/java/org/apache/commons/collections4/map/IdentityMap.java +++ b/src/test/java/org/apache/commons/collections4/map/IdentityMap.java @@ -47,7 +47,10 @@ public class IdentityMap extends AbstractHashedMap implements Serializable, Cloneable { /** - * HashEntry + * HashEntry. + * + * @param the key type. + * @param the value type. */ protected static class IdentityEntry extends HashEntry {