Class Maybe<T>
- java.lang.Object
-
- jetbrains.buildServer.buildTriggers.vcs.remoteRun.Maybe<T>
-
public final class Maybe<T> extends Object
The Maybe encapsulates an optional value. An object of typeMaybe<T>
either contains a value of type T (created byjust(value)
) or it is empty (created bynothing()
). TODO: Replace with java.util.Optional or get rid of boolean field- Author:
- dmitry.neverov
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
T
get()
int
hashCode()
boolean
isJust()
boolean
isNothing()
static <T> Maybe<T>
just(T value)
static <T> Maybe<T>
nothing()
-