|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Option | |
|---|---|
| edu.rice.cs.plt.collect | Contains general-purpose extensions to and variations on the java.util collections
framework. |
| edu.rice.cs.plt.iter | A collection of implementations of Iterable and Iterator. |
| edu.rice.cs.plt.lambda | A collection of interfaces facilitating first-class functions in Java. |
| edu.rice.cs.plt.tuple | Classes for the type-parameterized representation of tuples. |
| Uses of Option in edu.rice.cs.plt.collect |
|---|
| Methods in edu.rice.cs.plt.collect that return Option | ||
|---|---|---|
static
|
CollectUtil.castIfContains(Collection<? extends T> c,
Object obj)
Cast the given object to a collection element type if that object is contained by the collection. |
|
| Methods in edu.rice.cs.plt.collect with parameters of type Option | ||
|---|---|---|
static
|
CollectUtil.makeSet(Option<? extends T> opt)
Prodce an empty or singleton set based on the given Option. |
|
| Method parameters in edu.rice.cs.plt.collect with type arguments of type Option | ||
|---|---|---|
static
|
CollectUtil.partialFunctionClosure(Set<? extends T> base,
Lambda<? super T,? extends Option<? extends T>> function)
|
|
static
|
CollectUtil.partialFunctionClosure(T base,
Lambda<? super T,? extends Option<? extends T>> function)
|
|
| Uses of Option in edu.rice.cs.plt.iter |
|---|
| Methods in edu.rice.cs.plt.iter that return Option | ||
|---|---|---|
static
|
IterUtil.makeOption(Iterable<? extends T> iter)
Convert an iterable of 0 or 1 elements to an Option. |
|
| Methods in edu.rice.cs.plt.iter with parameters of type Option | ||
|---|---|---|
static
|
IterUtil.toIterable(Option<? extends T> option)
Produce an iterable of size 0 or 1 from an Option. |
|
| Uses of Option in edu.rice.cs.plt.lambda |
|---|
| Methods in edu.rice.cs.plt.lambda that return types with arguments of type Option | ||
|---|---|---|
static
|
LambdaUtil.wrapPartial(Lambda<? super T,? extends R> lambda,
boolean filterNull,
Predicate<? super RuntimeException> filterException)
Treat the given lambda as a partial function, where well-defined results have a "some" return type, and undefined results map to "none". |
|
static
|
LambdaUtil.wrapPartial(Lambda2<? super T1,? super T2,? extends R> lambda,
boolean filterNull,
Predicate<? super RuntimeException> filterException)
Treat the given lambda as a partial function, where well-defined results have a "some" return type, and undefined results map to "none". |
|
static
|
LambdaUtil.wrapPartial(Lambda3<? super T1,? super T2,? super T3,? extends R> lambda,
boolean filterNull,
Predicate<? super RuntimeException> filterException)
Treat the given lambda as a partial function, where well-defined results have a "some" return type, and undefined results map to "none". |
|
static
|
LambdaUtil.wrapPartial(Lambda4<? super T1,? super T2,? super T3,? super T4,? extends R> lambda,
boolean filterNull,
Predicate<? super RuntimeException> filterException)
Treat the given lambda as a partial function, where well-defined results have a "some" return type, and undefined results map to "none". |
|
static
|
LambdaUtil.wrapPartial(Thunk<? extends R> thunk,
boolean filterNull,
Predicate<? super RuntimeException> filterException)
Treat the given thunk as a partial function, where well-defined results have a "some" return type, and undefined results map to "none". |
|
| Uses of Option in edu.rice.cs.plt.tuple |
|---|
| Subclasses of Option in edu.rice.cs.plt.tuple | |
|---|---|
class |
IdentityWrapper<T>
A wrapper that defines IdentityWrapper.equals(java.lang.Object) and Tuple.hashCode() in terms of its value's
identity (==) instead of equality (@code equals}) |
class |
Null<T>
An empty tuple. |
class |
Wrapper<T>
An arbitrary 1-tuple; overrides Wrapper.toString(), Wrapper.equals(Object),
and Tuple.hashCode(). |
| Methods in edu.rice.cs.plt.tuple that return Option | ||
|---|---|---|
static
|
Option.none()
Return the "none" case singleton, cast to the appropriate type. |
|
static
|
Option.some(T val)
Create a "some" case wrapper for the given value. |
|
static
|
Option.wrap(T val)
Treat a possibly-null value as an Option: if the value is null, produce
a "none"; otherwise, produce a "some" wrapping the value. |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||