From 46c719b5538e8728f3f840b87064ddb04fa85517 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Sat, 13 Mar 2021 10:15:01 -0500 Subject: Update documentation --- src/main/java/bjc/data/Identity.java | 8 +++-- src/main/java/bjc/data/Lazy.java | 12 +++++--- src/main/java/bjc/data/Pair.java | 12 ++++---- src/main/java/bjc/data/QueuedIterator.java | 22 ++++++++------ src/main/java/bjc/funcdata/FunctionalList.java | 12 ++++---- src/test/java/bjc/TestUtils.java | 42 +++++++++++--------------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/main/java/bjc/data/Identity.java b/src/main/java/bjc/data/Identity.java index e488072..fc4798e 100644 --- a/src/main/java/bjc/data/Identity.java +++ b/src/main/java/bjc/data/Identity.java @@ -99,8 +99,8 @@ public class Identity implements Holder { /** * Create a new identity container. * - * @param val - * The contained value. + * @param The type of the contained value. + * @param val The contained value. * * @return A new identity container. */ @@ -110,7 +110,9 @@ public class Identity implements Holder { /** * Create a new empty identity container. - * + * + * @param The type of the contained value. + * * @return A new empty identity container. */ public static Identity id() { diff --git a/src/main/java/bjc/data/Lazy.java b/src/main/java/bjc/data/Lazy.java index 5fcd2ae..b237935 100644 --- a/src/main/java/bjc/data/Lazy.java +++ b/src/main/java/bjc/data/Lazy.java @@ -195,9 +195,10 @@ public class Lazy implements Holder { /** * Create a new lazy container with an already present value. - * - * @param val - * The value for the lazy container. + * + * @param The type of the contained value. + * + * @param val The value for the lazy container. * * @return A new lazy container holding that value. */ @@ -208,8 +209,9 @@ public class Lazy implements Holder { /** * Create a new lazy container with a suspended value. * - * @param supp - * The suspended value for the lazy container. + * @param The type of the contained value. + * + * @param supp The suspended value for the lazy container. * * @return A new lazy container that will un-suspend the value when necessary. */ diff --git a/src/main/java/bjc/data/Pair.java b/src/main/java/bjc/data/Pair.java index 42a28f8..baf1894 100644 --- a/src/main/java/bjc/data/Pair.java +++ b/src/main/java/bjc/data/Pair.java @@ -237,14 +237,14 @@ public interface Pair extends Bifunctor The type of the left side. + * @param The type of the right side. + * @param left The left side of the pair. + * @param right The right side of the pair. * @return A pair, with the specified left/right side. */ - public static Pair pair(T1 left, T2 right) { + public static Pair pair(Left left, Right right) { return new SimplePair<>(left, right); } } diff --git a/src/main/java/bjc/data/QueuedIterator.java b/src/main/java/bjc/data/QueuedIterator.java index 78f180d..805fc5e 100644 --- a/src/main/java/bjc/data/QueuedIterator.java +++ b/src/main/java/bjc/data/QueuedIterator.java @@ -9,8 +9,7 @@ import java.util.Iterator; * * @author bjculkin * - * @param - * The type of element this iterator iterates over + * @param The type of element this iterator iterates over */ public class QueuedIterator implements Iterator { private Iterator cur; @@ -19,7 +18,9 @@ public class QueuedIterator implements Iterator { /** * Static method for constructing iterators. - * + * + * @param The type of element this iterator iterates over + * * @return A queued iterator. */ public static QueuedIterator queued() { @@ -29,8 +30,9 @@ public class QueuedIterator implements Iterator { /** * Static method for constructing iterators. * - * @param vals - * The values to iterate over. + * @param The type of element this iterator iterates over + * + * @param vals The values to iterate over. * * @return A queued iterator. */ @@ -42,8 +44,9 @@ public class QueuedIterator implements Iterator { /** * Static method for constructing iterators. * - * @param itrs - * The iterators to use. + * @param The type of element this iterator iterates over + * + * @param itrs The iterators to use. * * @return A queued iterator over the provided iterators. */ @@ -55,8 +58,9 @@ public class QueuedIterator implements Iterator { /** * Static method for constructing iterators. * - * @param itrs - * The iterables to use. + * @param The type of element this iterator iterates over + * + * @param itrs The iterables to use. * * @return A queued iterator over the provided iterables. */ diff --git a/src/main/java/bjc/funcdata/FunctionalList.java b/src/main/java/bjc/funcdata/FunctionalList.java index f9c06a3..88f49c4 100644 --- a/src/main/java/bjc/funcdata/FunctionalList.java +++ b/src/main/java/bjc/funcdata/FunctionalList.java @@ -60,8 +60,10 @@ public class FunctionalList implements Cloneable, ListEx { * * Takes O(n) time, where n is the number of items specified * - * @param items - * The items to put into this functional list. + * @param The type of items to put into the list. + * + * @param items The items to put into this functional list. + * * @return The returned list. */ @SafeVarargs @@ -72,8 +74,7 @@ public class FunctionalList implements Cloneable, ListEx { /** * Create a new functional list with the specified size. * - * @param size - * The size of the backing list . + * @param size The size of the backing list . */ private FunctionalList(final int size) { wrapped = new ArrayList<>(size); @@ -84,8 +85,7 @@ public class FunctionalList implements Cloneable, ListEx { * * Takes O(1) time, since it doesn't copy the list. * - * @param backing - * The list to use as a backing list. + * @param backing The list to use as a backing list. */ public FunctionalList(final List backing) { if (backing == null) diff --git a/src/test/java/bjc/TestUtils.java b/src/test/java/bjc/TestUtils.java index 29e59e1..312ebaf 100644 --- a/src/test/java/bjc/TestUtils.java +++ b/src/test/java/bjc/TestUtils.java @@ -13,10 +13,9 @@ public class TestUtils { /** * Assert an iterator provides a particular sequence of values. * - * @param src - * The iterator to pull values from. - * @param vals - * The values to expect from the iterator. + * @param The type of the values. + * @param src The iterator to pull values from. + * @param vals The values to expect from the iterator. */ @SafeVarargs public static void assertIteratorEquals(Iterator src, T... vals) { @@ -35,12 +34,10 @@ public class TestUtils { /** * Assert an iterator provides a particular sequence of values. * - * @param src - * The iterator to pull values from. - * @param hasMore - * The expected value of hasNext for the iterator. - * @param vals - * The values to expect from the iterator. + * @param The type of the values. + * @param src The iterator to pull values from. + * @param hasMore The expected value of hasNext for the iterator. + * @param vals The values to expect from the iterator. */ @SafeVarargs public static void assertIteratorEquals(boolean hasMore, Iterator src, @@ -60,10 +57,9 @@ public class TestUtils { /** * Assert an iterator provides a particular sequence of values. * - * @param src - * The iterator to pull values from. - * @param vals - * The values to expect from the iterator. + * @param The type of the values. + * @param src The iterator to pull values from. + * @param vals The values to expect from the iterator. */ @SafeVarargs public static void assertIteratorSet(Iterator src, T... vals) { @@ -88,12 +84,10 @@ public class TestUtils { /** * Assert an iterator provides a particular sequence of values. * - * @param src - * The iterator to pull values from. - * @param hasMore - * The expected value of hasNext for the iterator. - * @param vals - * The values to expect from the iterator. + * @param The type of the values. + * @param src The iterator to pull values from. + * @param hasMore The expected value of hasNext for the iterator. + * @param vals The values to expect from the iterator. */ @SafeVarargs public static void assertIteratorSet(boolean hasMore, Iterator src, @@ -113,11 +107,9 @@ public class TestUtils { /** * Assert that a list contains a certain set of values. * - * @param src - * The list to read values from. - * - * @param exps - * The values to expect in the list. + * @param The type of the values. + * @param src The list to read values from. + * @param exps The values to expect in the list. */ @SafeVarargs public static void assertListEquals(List src, T... exps) { -- cgit v1.2.3