com.atlassian.confluence.cache.option
Class None<T>

java.lang.Object
  extended by 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

Field Summary
static None<?> INSTANCE
           
 
Constructor Summary
None()
           
 
Method Summary
 boolean exists()
           
 T getOrElse(T otherwise)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final None<?> INSTANCE
Constructor Detail

None

public None()
Method Detail

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-2011 Atlassian. All Rights Reserved.