- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptVisitor.java
More file actions
Latest commit
23 lines (22 loc) · 562 Bytes
/
Copy pathOptVisitor.java
File metadata and controls
23 lines (22 loc) · 562 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* Visitor interface for processing {@code Opt} instances.
*
* @param <T> the type of the contained value
* @param <R> the return type of the visitor
*/
publicinterfaceOptVisitor<T, R> {
/**
* Processes a {@code Some} instance.
*
* @param some the {@code Some} instance
* @return the result of processing
*/
Rvisit(Opt.Some<T> some);
/**
* Processes a {@code None} instance.
*
* @param none the {@code None} instance
* @return the result of processing
*/
Rvisit(Opt.None<T> none);
}