summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:48:04 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-04-22 14:48:04 -0400
commit42f7d379a430aaf2fad169f0170de04072b08b10 (patch)
tree5d46b43b2d9272f4e593820ee147b3ae3f0d82b0 /BJC-Utils2/src/main/java/bjc/utils/data/IHolder.java
parentb65b705c391bb772bc41269bce5243c1cc88969d (diff)
Formatting changes
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.java26
1 files changed, 13 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 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
@@ -64,6 +64,19 @@ public interface IHolder<ContainedType> {
Function<ContainedType, MappedType> mapper);
/**
+ * Replace the held value with a new one
+ *
+ * @param newValue
+ * The value to hold instead
+ * @return The holder itself
+ */
+ public default IHolder<ContainedType> replace(ContainedType newValue) {
+ return transform((oldValue) -> {
+ return newValue;
+ });
+ }
+
+ /**
* Transform the value held in this holder
*
* @param transformer
@@ -85,17 +98,4 @@ public interface IHolder<ContainedType> {
*/
public <UnwrappedType> UnwrappedType unwrap(
Function<ContainedType, UnwrappedType> unwrapper);
-
- /**
- * Replace the held value with a new one
- *
- * @param newValue
- * The value to hold instead
- * @return The holder itself
- */
- public default IHolder<ContainedType> replace(ContainedType newValue) {
- return transform((oldValue) -> {
- return newValue;
- });
- }
}