From df94066e3af02ff02d5ab4d033a3d603f743234c Mon Sep 17 00:00:00 2001 From: bjculkin Date: Mon, 12 Feb 2018 22:45:04 -0500 Subject: Formatting pass --- base/src/main/java/bjc/utils/data/Option.java | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'base/src/main/java/bjc/utils/data/Option.java') diff --git a/base/src/main/java/bjc/utils/data/Option.java b/base/src/main/java/bjc/utils/data/Option.java index 6eae21f..7869946 100644 --- a/base/src/main/java/bjc/utils/data/Option.java +++ b/base/src/main/java/bjc/utils/data/Option.java @@ -9,7 +9,7 @@ import java.util.function.UnaryOperator; * @author ben * * @param - * The type of the value that may or may not be held. + * The type of the value that may or may not be held. */ public class Option implements IHolder { private ContainedType held; @@ -18,7 +18,7 @@ public class Option implements IHolder { * Create a new optional, using the given initial value. * * @param seed - * The initial value for the optional. + * The initial value for the optional. */ public Option(final ContainedType seed) { held = seed; @@ -26,7 +26,7 @@ public class Option implements IHolder { @Override public IHolder bind(final Function> binder) { - if (held == null) return new Option<>(null); + if(held == null) return new Option<>(null); return binder.apply(held); } @@ -40,14 +40,14 @@ public class Option implements IHolder { @Override public IHolder map(final Function mapper) { - if (held == null) return new Option<>(null); + if(held == null) return new Option<>(null); return new Option<>(mapper.apply(held)); } @Override public IHolder transform(final UnaryOperator transformer) { - if (held != null) { + if(held != null) { held = transformer.apply(held); } @@ -56,7 +56,7 @@ public class Option implements IHolder { @Override public UnwrappedType unwrap(final Function unwrapper) { - if (held == null) return null; + if(held == null) return null; return unwrapper.apply(held); } @@ -78,15 +78,15 @@ public class Option implements IHolder { @Override public boolean equals(final Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (!(obj instanceof Option)) return false; + if(this == obj) return true; + if(obj == null) return false; + if(!(obj instanceof Option)) return false; final Option other = (Option) obj; - if (held == null) { - if (other.held != null) return false; - } else if (!held.equals(other.held)) return false; + if(held == null) { + if(other.held != null) return false; + } else if(!held.equals(other.held)) return false; return true; } -- cgit v1.2.3