diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-07-28 16:44:36 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-07-28 16:44:36 -0400 |
| commit | dca8e9f586fd595a7995f07788318fb92b8cce79 (patch) | |
| tree | 4fdf216d4a30c2c663d4a429f79cfa471c8579c4 /BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java | |
| parent | b1317e5e62bb044cd8a676cb3fc2da86e9922caf (diff) | |
Format/Cleanup pass
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java | 25 |
1 files changed, 12 insertions, 13 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 58ae5db..b2e4369 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java @@ -25,8 +25,8 @@ public interface IHolder<ContainedType> extends Functor<ContainedType> { * The function to bind to the value * @return A holder from binding the value */ - public <BoundType> IHolder<BoundType> - bind(Function<ContainedType, IHolder<BoundType>> binder); + public <BoundType> IHolder<BoundType> bind( + Function<ContainedType, IHolder<BoundType>> binder); /** * Apply an action to the value @@ -43,9 +43,8 @@ public interface IHolder<ContainedType> extends Functor<ContainedType> { } @Override - default <ArgType, ReturnType> - Function<Functor<ArgType>, Functor<ReturnType>> - fmap(Function<ArgType, ReturnType> func) { + default <ArgType, ReturnType> Function<Functor<ArgType>, Functor<ReturnType>> fmap( + Function<ArgType, ReturnType> func) { return (argumentFunctor) -> { if (!(argumentFunctor instanceof IHolder<?>)) { throw new IllegalArgumentException( @@ -72,8 +71,8 @@ public interface IHolder<ContainedType> extends Functor<ContainedType> { * The function to lift over the holder * @return The function lifted over the holder */ - public <NewType> Function<ContainedType, IHolder<NewType>> - lift(Function<ContainedType, NewType> func); + public <NewType> Function<ContainedType, IHolder<NewType>> lift( + Function<ContainedType, NewType> func); /** * Make this holder lazy @@ -114,8 +113,8 @@ public interface IHolder<ContainedType> extends Functor<ContainedType> { * The function to do mapping with * @return A holder with the mapped value */ - public <MappedType> IHolder<MappedType> - map(Function<ContainedType, MappedType> mapper); + public <MappedType> IHolder<MappedType> map( + Function<ContainedType, MappedType> mapper); /** * Replace the held value with a new one @@ -137,8 +136,8 @@ public interface IHolder<ContainedType> extends Functor<ContainedType> { * The function to transform the value with * @return The holder itself, for easy chaining */ - public IHolder<ContainedType> - transform(UnaryOperator<ContainedType> transformer); + public IHolder<ContainedType> transform( + UnaryOperator<ContainedType> transformer); /** * Unwrap the value contained in this holder so that it is no longer @@ -150,6 +149,6 @@ public interface IHolder<ContainedType> extends Functor<ContainedType> { * The function to use to unwrap the value * @return The unwrapped held value */ - public <UnwrappedType> UnwrappedType - unwrap(Function<ContainedType, UnwrappedType> unwrapper); + public <UnwrappedType> UnwrappedType unwrap( + Function<ContainedType, UnwrappedType> unwrapper); } |
