Javadoc fixes. Closes #43.

This commit is contained in:
Stephan Fuhrmann 2018-06-15 16:26:27 -06:00 committed by Gary Gregory
parent 8f9e66fbf0
commit 775886ba0c
5 changed files with 64 additions and 38 deletions

View File

@ -1074,7 +1074,7 @@ public class IterableUtils {
/** /**
* Fail-fast check for null arguments. * Fail-fast check for null arguments.
* *
* @param iterable the iterable to check * @param iterables the iterables to check
* @throws NullPointerException if the argument or any of its contents is null * @throws NullPointerException if the argument or any of its contents is null
*/ */
static void checkNotNull(final Iterable<?>... iterables) { static void checkNotNull(final Iterable<?>... iterables) {

View File

@ -579,7 +579,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* do the actual lookup of a piece of data * do the actual lookup of a piece of data
* *
* @param data the key or value to be looked up * @param data the key or value to be looked up
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the desired Node, or null if there is no mapping of the * @return the desired Node, or null if there is no mapping of the
* specified data * specified data
*/ */
@ -612,7 +613,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* get the next larger node from the specified node * get the next larger node from the specified node
* *
* @param node the node to be searched from * @param node the node to be searched from
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the specified node * @return the specified node
*/ */
private Node<K, V> nextGreater(final Node<K, V> node, final DataElement dataElement) { private Node<K, V> nextGreater(final Node<K, V> node, final DataElement dataElement) {
@ -646,7 +648,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* get the next larger node from the specified node * get the next larger node from the specified node
* *
* @param node the node to be searched from * @param node the node to be searched from
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the specified node * @return the specified node
*/ */
private Node<K, V> nextSmaller(final Node<K, V> node, final DataElement dataElement) { private Node<K, V> nextSmaller(final Node<K, V> node, final DataElement dataElement) {
@ -695,7 +698,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Find the least node from a given node. * Find the least node from a given node.
* *
* @param node the node from which we will start searching * @param node the node from which we will start searching
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the smallest node, from the specified node, in the * @return the smallest node, from the specified node, in the
* specified mapping * specified mapping
*/ */
@ -713,7 +717,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Find the greatest node from a given node. * Find the greatest node from a given node.
* *
* @param node the node from which we will start searching * @param node the node from which we will start searching
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the greatest node, from the specified node * @return the greatest node, from the specified node
*/ */
private Node<K, V> greatestNode(final Node<K, V> node, final DataElement dataElement) { private Node<K, V> greatestNode(final Node<K, V> node, final DataElement dataElement) {
@ -732,7 +737,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* *
* @param from the node whose color we're copying; may be null * @param from the node whose color we're copying; may be null
* @param to the node whose color we're changing; may be null * @param to the node whose color we're changing; may be null
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void copyColor(final Node<K, V> from, final Node<K, V> to, final DataElement dataElement) { private void copyColor(final Node<K, V> from, final Node<K, V> to, final DataElement dataElement) {
if (to != null) { if (to != null) {
@ -750,7 +756,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* black, thank you * black, thank you
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private static boolean isRed(final Node<?, ?> node, final DataElement dataElement) { private static boolean isRed(final Node<?, ?> node, final DataElement dataElement) {
return node != null && node.isRed(dataElement); return node != null && node.isRed(dataElement);
@ -761,7 +768,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* it's black, thank you * it's black, thank you
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private static boolean isBlack(final Node<?, ?> node, final DataElement dataElement) { private static boolean isBlack(final Node<?, ?> node, final DataElement dataElement) {
return node == null || node.isBlack(dataElement); return node == null || node.isBlack(dataElement);
@ -771,7 +779,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* force a node (if it exists) red * force a node (if it exists) red
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private static void makeRed(final Node<?, ?> node, final DataElement dataElement) { private static void makeRed(final Node<?, ?> node, final DataElement dataElement) {
if (node != null) { if (node != null) {
@ -783,7 +792,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* force a node (if it exists) black * force a node (if it exists) black
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private static void makeBlack(final Node<?, ?> node, final DataElement dataElement) { private static void makeBlack(final Node<?, ?> node, final DataElement dataElement) {
if (node != null) { if (node != null) {
@ -796,7 +806,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* its grandparent may not exist. no problem * its grandparent may not exist. no problem
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private Node<K, V> getGrandParent(final Node<K, V> node, final DataElement dataElement) { private Node<K, V> getGrandParent(final Node<K, V> node, final DataElement dataElement) {
return getParent(getParent(node, dataElement), dataElement); return getParent(getParent(node, dataElement), dataElement);
@ -807,7 +818,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* exist. no problem * exist. no problem
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private Node<K, V> getParent(final Node<K, V> node, final DataElement dataElement) { private Node<K, V> getParent(final Node<K, V> node, final DataElement dataElement) {
return node == null ? null : node.getParent(dataElement); return node == null ? null : node.getParent(dataElement);
@ -818,7 +830,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* problem * problem
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private Node<K, V> getRightChild(final Node<K, V> node, final DataElement dataElement) { private Node<K, V> getRightChild(final Node<K, V> node, final DataElement dataElement) {
return node == null ? null : node.getRight(dataElement); return node == null ? null : node.getRight(dataElement);
@ -829,7 +842,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* problem * problem
* *
* @param node the node (may be null) in question * @param node the node (may be null) in question
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private Node<K, V> getLeftChild(final Node<K, V> node, final DataElement dataElement) { private Node<K, V> getLeftChild(final Node<K, V> node, final DataElement dataElement) {
return node == null ? null : node.getLeft(dataElement); return node == null ? null : node.getLeft(dataElement);
@ -839,7 +853,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* do a rotate left. standard fare in the world of balanced trees * do a rotate left. standard fare in the world of balanced trees
* *
* @param node the node to be rotated * @param node the node to be rotated
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void rotateLeft(final Node<K, V> node, final DataElement dataElement) { private void rotateLeft(final Node<K, V> node, final DataElement dataElement) {
final Node<K, V> rightChild = node.getRight(dataElement); final Node<K, V> rightChild = node.getRight(dataElement);
@ -867,7 +882,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* do a rotate right. standard fare in the world of balanced trees * do a rotate right. standard fare in the world of balanced trees
* *
* @param node the node to be rotated * @param node the node to be rotated
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void rotateRight(final Node<K, V> node, final DataElement dataElement) { private void rotateRight(final Node<K, V> node, final DataElement dataElement) {
final Node<K, V> leftChild = node.getLeft(dataElement); final Node<K, V> leftChild = node.getLeft(dataElement);
@ -1212,8 +1228,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Comparable and non-null * Comparable and non-null
* *
* @param o the object being checked * @param o the object being checked
* @param index the KEY or VALUE int (used to put the right word in the * @param dataElement either {@link DataElement#KEY} key}
* exception message) * or the {@link DataElement#VALUE value}.
* *
* @throws NullPointerException if o is null * @throws NullPointerException if o is null
* @throws ClassCastException if o is not Comparable * @throws ClassCastException if o is not Comparable
@ -1337,7 +1353,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Compares for equals as per the API. * Compares for equals as per the API.
* *
* @param obj the object to compare to * @param obj the object to compare to
* @param type the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return true if equal * @return true if equal
*/ */
private boolean doEquals(final Object obj, final DataElement dataElement) { private boolean doEquals(final Object obj, final DataElement dataElement) {
@ -1373,7 +1390,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Gets the hash code value for this map as per the API. * Gets the hash code value for this map as per the API.
* *
* @param type the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the hash code value for this map * @return the hash code value for this map
*/ */
private int doHashCode(final DataElement dataElement) { private int doHashCode(final DataElement dataElement) {
@ -1391,7 +1409,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Gets the string form of this map as per AbstractMap. * Gets the string form of this map as per AbstractMap.
* *
* @param type the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the string form of this map * @return the string form of this map
*/ */
private String doToString(final DataElement dataElement) { private String doToString(final DataElement dataElement) {
@ -1476,7 +1495,6 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Constructor. * Constructor.
* @param orderType the KEY or VALUE int for the order * @param orderType the KEY or VALUE int for the order
* @param main the main map
*/ */
View(final DataElement orderType) { View(final DataElement orderType) {
super(); super();
@ -1650,7 +1668,6 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Constructor. * Constructor.
* @param orderType the KEY or VALUE int for the order * @param orderType the KEY or VALUE int for the order
* @param main the main map
*/ */
ViewIterator(final DataElement orderType) { ViewIterator(final DataElement orderType) {
super(); super();
@ -1879,8 +1896,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Make a new cell with given key and value, and with null * Make a new cell with given key and value, and with null
* links, and black (true) colors. * links, and black (true) colors.
* *
* @param key * @param key the key of this node
* @param value * @param value the value of this node
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Node(final K key, final V value) { Node(final K key, final V value) {
@ -1925,7 +1942,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Set this node's parent node. * Set this node's parent node.
* *
* @param node the new parent node * @param node the new parent node
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void setParent(final Node<K, V> node, final DataElement dataElement) { private void setParent(final Node<K, V> node, final DataElement dataElement) {
parentNode[dataElement.ordinal()] = node; parentNode[dataElement.ordinal()] = node;
@ -1934,7 +1952,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Get the parent node. * Get the parent node.
* *
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return the parent node, may be null * @return the parent node, may be null
*/ */
private Node<K, V> getParent(final DataElement dataElement) { private Node<K, V> getParent(final DataElement dataElement) {
@ -1945,7 +1964,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Exchange colors with another node. * Exchange colors with another node.
* *
* @param node the node to swap with * @param node the node to swap with
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void swapColors(final Node<K, V> node, final DataElement dataElement) { private void swapColors(final Node<K, V> node, final DataElement dataElement) {
// Swap colors -- old hacker's trick // Swap colors -- old hacker's trick
@ -1957,7 +1977,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Is this node black? * Is this node black?
* *
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return true if black (which is represented as a true boolean) * @return true if black (which is represented as a true boolean)
*/ */
private boolean isBlack(final DataElement dataElement) { private boolean isBlack(final DataElement dataElement) {
@ -1967,7 +1988,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Is this node red? * Is this node red?
* *
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
* @return true if non-black * @return true if non-black
*/ */
private boolean isRed(final DataElement dataElement) { private boolean isRed(final DataElement dataElement) {
@ -1977,7 +1999,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Make this node black. * Make this node black.
* *
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void setBlack(final DataElement dataElement) { private void setBlack(final DataElement dataElement) {
blackColor[dataElement.ordinal()] = true; blackColor[dataElement.ordinal()] = true;
@ -1986,7 +2009,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Make this node red. * Make this node red.
* *
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void setRed(final DataElement dataElement) { private void setRed(final DataElement dataElement) {
blackColor[dataElement.ordinal()] = false; blackColor[dataElement.ordinal()] = false;
@ -1996,7 +2020,8 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
* Make this node the same color as another * Make this node the same color as another
* *
* @param node the node whose color we're adopting * @param node the node whose color we're adopting
* @param index the KEY or VALUE int * @param dataElement either {@link DataElement#KEY} key}
* or the {@link DataElement#VALUE value}.
*/ */
private void copyColor(final Node<K, V> node, final DataElement dataElement) { private void copyColor(final Node<K, V> node, final DataElement dataElement) {
blackColor[dataElement.ordinal()] = node.blackColor[dataElement.ordinal()]; blackColor[dataElement.ordinal()] = node.blackColor[dataElement.ordinal()];
@ -2036,7 +2061,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/** /**
* Optional operation that is not permitted in this implementation * Optional operation that is not permitted in this implementation
* *
* @param ignored * @param ignored this parameter is ignored.
* @return does not return * @return does not return
* @throws UnsupportedOperationException always * @throws UnsupportedOperationException always
*/ */

View File

@ -194,7 +194,8 @@ class FunctorUtils {
* simply as centralised documentation and atomic unchecked warning * simply as centralised documentation and atomic unchecked warning
* suppression. * suppression.
* *
* @param <T> the type of object the returned transformer should "accept" * @param <I> the type of object the returned transformer should "accept"
* @param <O> the type of object the returned transformer should "produce"
* @param transformer the transformer to coerce. * @param transformer the transformer to coerce.
* @return the coerced transformer. * @return the coerced transformer.
*/ */

View File

@ -47,7 +47,7 @@ import java.util.Iterator;
*/ */
public abstract class LazyIteratorChain<E> implements Iterator<E> { public abstract class LazyIteratorChain<E> implements Iterator<E> {
/** The number of times {@link #nextIterator()} was already called. */ /** The number of times {@link #next()} was already called. */
private int callCounter = 0; private int callCounter = 0;
/** Indicates that the Iterator chain has been exhausted. */ /** Indicates that the Iterator chain has been exhausted. */

View File

@ -815,7 +815,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
* As a consequence, all subsequent call to {@link #getKey()}, * As a consequence, all subsequent call to {@link #getKey()},
* {@link #setValue(Object)} and {@link #getValue()} will fail. * {@link #setValue(Object)} and {@link #getValue()} will fail.
* *
* @param flag * @param flag the new value of the removed flag
*/ */
void setRemoved(final boolean flag) { void setRemoved(final boolean flag) {
this.removed = flag; this.removed = flag;