summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/data
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 /src/main/java/bjc/data
parent1b9aa36ee069938d49dc719dd0f23b6d877229cc (diff)
Update documentation
Diffstat (limited to 'src/main/java/bjc/data')
-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
4 files changed, 31 insertions, 23 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.
*/