org.androidannotations.helper
Class Option<T>

java.lang.Object
  extended by org.androidannotations.helper.Option<T>

public class Option<T>
extends Object

I'd love to use Guava's Optional, but we're trying to keep the dependency level to a minimum.


Method Summary
static
<T> Option<T>
absent()
           
 T get()
           
 T getOr(T defaultValue)
           
 boolean isAbsent()
           
 boolean isPresent()
           
static
<T> Option<T>
of(T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

of

public static <T> Option<T> of(T value)

absent

public static <T> Option<T> absent()

isPresent

public boolean isPresent()

isAbsent

public boolean isAbsent()

get

public T get()

getOr

public T getOr(T defaultValue)


Copyright © 2010-2014. All Rights Reserved.