From 27bf571d6413c3cc6a5d664b5bddd38d21d7b1cd Mon Sep 17 00:00:00 2001 From: EVE Date: Mon, 13 Mar 2017 16:42:21 -0400 Subject: Formatting --- .../src/main/java/bjc/utils/data/IHolder.java | 45 +++++++++------------- 1 file changed, 19 insertions(+), 26 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java') 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 a05d90e..7b6c8d5 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java @@ -16,26 +16,25 @@ import bjc.utils.funcdata.theory.Functor; * @author ben * * @param - * The type of value held + * The type of value held */ public interface IHolder extends Functor { /** * Bind a function across the value in this container * * @param - * The type of value in this container + * The type of value in this container * @param binder - * The function to bind to the value + * The function to bind to the value * @return A holder from binding the value */ - public IHolder bind( - Function> binder); + public IHolder bind(Function> binder); /** * Apply an action to the value * * @param action - * The action to apply to the value + * The action to apply to the value */ public default void doWith(Consumer action) { transform((value) -> { @@ -46,10 +45,8 @@ public interface IHolder extends Functor { } @Override - default Function, - Functor> fmap( - Function func) { + default Function, Functor> fmap( + Function func) { return (argumentFunctor) -> { if (!(argumentFunctor instanceof IHolder)) { throw new IllegalArgumentException( @@ -71,13 +68,12 @@ public interface IHolder extends Functor { * Lifts a function to bind over this holder * * @param - * The type of the functions return + * The type of the functions return * @param func - * The function to lift over the holder + * The function to lift over the holder * @return The function lifted over the holder */ - public Function> lift( - Function func); + public Function> lift(Function func); /** * Make this holder lazy @@ -113,19 +109,18 @@ public interface IHolder extends Functor { * Does not change the internal state of this holder * * @param - * The type of the mapped value + * The type of the mapped value * @param mapper - * The function to do mapping with + * The function to do mapping with * @return A holder with the mapped value */ - public IHolder map( - Function mapper); + public IHolder map(Function mapper); /** * Replace the held value with a new one * * @param newValue - * The value to hold instead + * The value to hold instead * @return The holder itself */ public default IHolder replace(ContainedType newValue) { @@ -138,22 +133,20 @@ public interface IHolder extends Functor { * Transform the value held in this holder * * @param transformer - * The function to transform the value with + * The function to transform the value with * @return The holder itself, for easy chaining */ - public IHolder transform( - UnaryOperator transformer); + public IHolder transform(UnaryOperator transformer); /** * Unwrap the value contained in this holder so that it is no longer * held * * @param - * The type of the unwrapped value + * The type of the unwrapped value * @param unwrapper - * The function to use to unwrap the value + * The function to use to unwrap the value * @return The unwrapped held value */ - public UnwrappedType unwrap( - Function unwrapper); + public UnwrappedType unwrap(Function unwrapper); } -- cgit v1.2.3