com.atlassian.confluence.cache.option
Class None<T>
java.lang.Object
com.atlassian.confluence.cache.option.None<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Option<T>, Serializable
public class None<T>
- extends Object
- implements Option<T>
A cached option for no value. This is used when the factory does not find the value to cache and
the missing value needs to be cached.
The readResolve()
method has been implemented to return the singleton instance so the
Object.equals(Object)
and Object.hashCode()
methods behave as expected for objects that have propagated
over the distributed cache.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface com.atlassian.confluence.cache.option.Option |
Option.Builder |
Constructor Summary |
None()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final None<?> INSTANCE
None
public None()
exists
public boolean exists()
- Specified by:
exists
in interface Option<T>
getOrElse
public T getOrElse(T otherwise)
- Specified by:
getOrElse
in interface Option<T>
Copyright © 2003-2013 Atlassian. All Rights Reserved.