org.littleshoot.util
Interface Optional<T>

Type Parameters:
T - The type of object this optional object holds.
All Known Subinterfaces:
None<T>, Some<T>
All Known Implementing Classes:
NoneImpl, SomeImpl

public interface Optional<T>

An optional object. We use this in place of null where possible, since it does a better job of forcing the 'null' value to be handled.


Method Summary
<ReturnT> ReturnT
accept(OptionalVisitor<ReturnT,T> visitor)
          Accepts a visitor to this optional object.
 

Method Detail

accept

<ReturnT> ReturnT accept(OptionalVisitor<ReturnT,T> visitor)
Accepts a visitor to this optional object.

Type Parameters:
ReturnT - The type returned by the visitor.
Parameters:
visitor - The visitor.
Returns:
The result of visiting this optional object with the given visitor.


Copyright © 2011-2013 LittleShoot. All Rights Reserved.