summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Culkin <scorpress@gmail.com>2021-03-13 10:15:01 -0500
committerBen Culkin <scorpress@gmail.com>2021-03-13 10:15:01 -0500
commit46c719b5538e8728f3f840b87064ddb04fa85517 (patch)
tree3a4ecbd9f74fb9207db98e549071d229b94e10d1
parent1b9aa36ee069938d49dc719dd0f23b6d877229cc (diff)
Update documentation
-rw-r--r--src/main/java/bjc/data/Identity.java8
-rw-r--r--src/main/java/bjc/data/Lazy.java12
-rw-r--r--src/main/java/bjc/data/Pair.java12
-rw-r--r--src/main/java/bjc/data/QueuedIterator.java22
-rw-r--r--src/main/java/bjc/funcdata/FunctionalList.java12
-rw-r--r--src/test/java/bjc/TestUtils.java42
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<ContainedType> implements Holder<ContainedType> {
/**
* Create a new identity container.
*
- * @param val
- * The contained value.
+ * @param <ContainedType> The type of the contained value.
+ * @param val The contained value.
*
* @return A new identity container.
*/
@@ -110,7 +110,9 @@ public class Identity<ContainedType> implements Holder<ContainedType> {
/**
* Create a new empty identity container.
- *
+ *
+ * @param <ContainedType> The type of the contained value.
+ *
* @return A new empty identity container.
*/
public static <ContainedType> Identity<ContainedType> 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<ContainedType> implements Holder<ContainedType> {
/**
* Create a new lazy container with an already present value.
- *
- * @param val
- * The value for the lazy container.
+ *
+ * @param <ContainedType> 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<ContainedType> implements Holder<ContainedType> {
/**
* Create a new lazy container with a suspended value.
*
- * @param supp
- * The suspended value for the lazy container.
+ * @param <ContainedType> 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<LeftType, RightType> extends Bifunctor<LeftType, RightType
/**
* Static pair constructor.
- *
- * @param left
- * The left side of the pair.
- * @param right
- * The right side of the pair.
+ *
+ * @param <Left> The type of the left side.
+ * @param <Right> 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 <T1, T2> Pair<T1, T2> pair(T1 left, T2 right) {
+ public static <Left, Right> Pair<Left, Right> 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 <E>
- * The type of element this iterator iterates over
+ * @param <E> The type of element this iterator iterates over
*/
public class QueuedIterator<E> implements Iterator<E> {
private Iterator<E> cur;
@@ -19,7 +18,9 @@ public class QueuedIterator<E> implements Iterator<E> {
/**
* Static method for constructing iterators.
- *
+ *
+ * @param <E> The type of element this iterator iterates over
+ *
* @return A queued iterator.
*/
public static <E> QueuedIterator<E> queued() {
@@ -29,8 +30,9 @@ public class QueuedIterator<E> implements Iterator<E> {
/**
* Static method for constructing iterators.
*
- * @param vals
- * The values to iterate over.
+ * @param <E> 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<E> implements Iterator<E> {
/**
* Static method for constructing iterators.
*
- * @param itrs
- * The iterators to use.
+ * @param <E> 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<E> implements Iterator<E> {
/**
* Static method for constructing iterators.
*
- * @param itrs
- * The iterables to use.
+ * @param <E> 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<E> implements Cloneable, ListEx<E> {
*
* Takes O(n) time, where n is the number of items specified
*
- * @param items
- * The items to put into this functional list.
+ * @param <T> 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<E> implements Cloneable, ListEx<E> {
/**
* 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<E> implements Cloneable, ListEx<E> {
*
* 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<E> 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 <T> 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 <T> void assertIteratorEquals(Iterator<T> 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 <T> 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 <T> void assertIteratorEquals(boolean hasMore, Iterator<T> 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 <T> 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 <T> void assertIteratorSet(Iterator<T> 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 <T> 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 <T> void assertIteratorSet(boolean hasMore, Iterator<T> 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 <T> 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 <T> void assertListEquals(List<T> src, T... exps) {