|
||||||||||
| 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.concurrent | Contains tools to support safe multi-threaded programs. |
| edu.rice.cs.plt.debug | Defines a variety of logging classes, along with other facilities for code-embedded debugging. |
| edu.rice.cs.plt.io | Provides extensions to the java.io package, which provides character- and byte- based
streams and buffers, files, file filters, and serialization. |
| 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)
Produce 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)
Produce the set containing the elements in base and all values produced an arbitrary number
of applications of function to one of these elements. |
|
static
|
CollectUtil.partialFunctionClosure(T base,
Lambda<? super T,? extends Option<? extends T>> function)
Produce the set containing base and all values produced an arbitrary number of applications
of function to base. |
|
| Uses of Option in edu.rice.cs.plt.concurrent |
|---|
| Methods in edu.rice.cs.plt.concurrent that return Option | |
|---|---|
Option<R> |
TaskController.attemptGet(long timeout)
Try to get the result within the given amount of time. |
Option<R> |
TaskController.attemptGet(long timeout,
TimeUnit unit)
Try to get the result within the given amount of time. |
| Uses of Option in edu.rice.cs.plt.debug |
|---|
| Methods in edu.rice.cs.plt.debug that return Option | |
|---|---|
Option<StackTraceElement> |
LogSink.Message.caller()
The location from which the log method was invoked, if available. |
Option<String> |
LogSink.Message.text()
An optional, arbitrary text message to be logged. |
| Methods in edu.rice.cs.plt.debug with parameters of type Option | |
|---|---|
protected static String |
TextLogSink.formatLocation(Option<StackTraceElement> location)
Convert a location to a string of the form "edu.rice.cs.plt.debug.TextLogSink.formatLocation(24)" |
| Uses of Option in edu.rice.cs.plt.io |
|---|
| Methods in edu.rice.cs.plt.io that return Option | |
|---|---|
static Option<?> |
IOUtil.ensureSerializable(Option<?> opt)
Apply ensureSerializable() to the given option value. |
| Methods in edu.rice.cs.plt.io with parameters of type Option | |
|---|---|
static Option<?> |
IOUtil.ensureSerializable(Option<?> opt)
Apply ensureSerializable() to the given option value. |
| 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 Option | |
|---|---|
Option<R> |
CachedThunk.cachedValue()
Combines CachedThunk.isResolved() and CachedThunk.value() in an atomic operation (avoiding inconsistencies
due to a concurrent CachedThunk.reset()): if a value is cached, return it; otherwise, return "none". |
| 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. |
|
| Methods in edu.rice.cs.plt.tuple that return types with arguments of type Option | ||
|---|---|---|
static
|
Option.comparator()
Produce a comparator for options, ordered by the natural order of the elements with "none" values at the front. |
|
static
|
Option.comparator(Comparator<? super T> comp)
Produce a comparator for options, ordered by the given comparator with "none" values at the front. |
|
| Methods in edu.rice.cs.plt.tuple with parameters of type Option | ||
|---|---|---|
static
|
Option.unwrap(Option<? extends T> opt,
T forNone)
A more general form of the instance method unwrap(Object), allowing forNone
to have a different type than opt (the result has a common supertype). |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||