org.androidannotations.helper
Class Option<T>
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.