cakoose.util
Class Maybe<T>

java.lang.Object
  extended by cakoose.util.Maybe<T>

public final class Maybe<T>
extends Object


Method Summary
 boolean equals(Maybe<?> other)
           
 boolean equals(Object other)
           
 T get(T def)
           
 T getJust()
           
 int hashCode()
           
 boolean isJust()
           
 boolean isNothing()
           
static
<T> Maybe<T>
Just(T value)
           
static
<T> Maybe<T>
Nothing()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isNothing

public boolean isNothing()

isJust

public boolean isJust()

getJust

public T getJust()

get

public T get(T def)

Nothing

public static <T> Maybe<T> Nothing()

Just

public static <T> Maybe<T> Just(T value)

equals

public boolean equals(Object other)
Overrides:
equals in class Object

equals

public boolean equals(Maybe<?> other)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object