From 42f7d379a430aaf2fad169f0170de04072b08b10 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 22 Apr 2016 14:48:04 -0400 Subject: Formatting changes --- .../src/main/java/bjc/utils/data/IHolder.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 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 77eb899..ecf3f14 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java @@ -63,6 +63,19 @@ public interface IHolder { public IHolder map( Function mapper); + /** + * Replace the held value with a new one + * + * @param newValue + * The value to hold instead + * @return The holder itself + */ + public default IHolder replace(ContainedType newValue) { + return transform((oldValue) -> { + return newValue; + }); + } + /** * Transform the value held in this holder * @@ -85,17 +98,4 @@ public interface IHolder { */ public UnwrappedType unwrap( Function unwrapper); - - /** - * Replace the held value with a new one - * - * @param newValue - * The value to hold instead - * @return The holder itself - */ - public default IHolder replace(ContainedType newValue) { - return transform((oldValue) -> { - return newValue; - }); - } } -- cgit v1.2.3