From 82951e37e10b282d9a7c89f4662990b64949c943 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Mon, 29 Feb 2016 10:41:17 -0500 Subject: General code cleanup --- BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java | 6 +++--- BJC-Utils2/src/main/java/bjc/utils/data/IPair.java | 15 +++++++++++---- BJC-Utils2/src/main/java/bjc/utils/data/IPrecedent.java | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java index aa7d5bd..b6e752b 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java @@ -21,7 +21,7 @@ public interface IHolder { * The transformation to apply * @return A holder with the transformed value */ - IHolder map(Function f); + public IHolder map(Function f); /** * Apply the given transformation to the held value. Returns the holder @@ -31,7 +31,7 @@ public interface IHolder { * The transform to apply to the value * @return The holder */ - IHolder transform(Function f); + public IHolder transform(Function f); /** * Returns a raw mapped value, not contained in a GenHolder @@ -40,6 +40,6 @@ public interface IHolder { * The function to use for mapping the value * @return The mapped value outside of a GenHolder */ - E unwrap(Function f); + public E unwrap(Function f); } \ No newline at end of file diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java b/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java index 9da7d22..fcf2b05 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IPair.java @@ -16,7 +16,8 @@ public interface IPair { * The function to apply to the right value. * @return A new pair containing the two modified values. */ - IPair apply(Function lf, Function rf); + public IPair apply(Function lf, + Function rf); /** * Collapse this pair to a single value. Does not change the internal @@ -26,8 +27,14 @@ public interface IPair { * The function to use to collapse the pair. * @return The collapsed value. */ - E merge(BiFunction bf); - - void doWith(BiConsumer bc); + public E merge(BiFunction bf); + /** + * Execute an action with the values of this pair. Has no effect on the + * internal contents + * + * @param bc + * The action to execute on the values + */ + public void doWith(BiConsumer bc); } \ No newline at end of file diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/IPrecedent.java b/BJC-Utils2/src/main/java/bjc/utils/data/IPrecedent.java index 98258ef..1e00a59 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IPrecedent.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IPrecedent.java @@ -12,7 +12,7 @@ public interface IPrecedent { * * @return The precedence of the attached object */ - int getPrecedence(); + public int getPrecedence(); /** * Create a new object with set precedence @@ -21,7 +21,7 @@ public interface IPrecedent { * The precedence of the object to handle * @return A new object with set precedence */ - static IPrecedent newSimplePrecedent(int prec) { + public static IPrecedent newSimplePrecedent(int prec) { return () -> prec; } } \ No newline at end of file -- cgit v1.2.3