diff options
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java | 6 | ||||
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/data/IPair.java | 15 | ||||
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/data/IPrecedent.java | 4 |
3 files changed, 16 insertions, 9 deletions
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<T> { * The transformation to apply * @return A holder with the transformed value */ - <NewT> IHolder<NewT> map(Function<T, NewT> f); + public <NewT> IHolder<NewT> map(Function<T, NewT> f); /** * Apply the given transformation to the held value. Returns the holder @@ -31,7 +31,7 @@ public interface IHolder<T> { * The transform to apply to the value * @return The holder */ - IHolder<T> transform(Function<T, T> f); + public IHolder<T> transform(Function<T, T> f); /** * Returns a raw mapped value, not contained in a GenHolder @@ -40,6 +40,6 @@ public interface IHolder<T> { * The function to use for mapping the value * @return The mapped value outside of a GenHolder */ - <E> E unwrap(Function<T, E> f); + public <E> E unwrap(Function<T, E> 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<L, R> { * The function to apply to the right value. * @return A new pair containing the two modified values. */ - <L2, R2> IPair<L2, R2> apply(Function<L, L2> lf, Function<R, R2> rf); + public <L2, R2> IPair<L2, R2> apply(Function<L, L2> lf, + Function<R, R2> rf); /** * Collapse this pair to a single value. Does not change the internal @@ -26,8 +27,14 @@ public interface IPair<L, R> { * The function to use to collapse the pair. * @return The collapsed value. */ - <E> E merge(BiFunction<L, R, E> bf); - - void doWith(BiConsumer<L, R> bc); + public <E> E merge(BiFunction<L, R, E> 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<L, R> 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 |
