Package | Description |
---|---|
java.lang |
Provides classes that are fundamental to the design of the Java
programming language.
|
java.lang.module |
Classes to support module descriptors and creating configurations of modules
by means of resolution and service binding.
|
java.lang.reflect |
Provides classes and interfaces for obtaining reflective information about
modules, classes and objects.
|
java.net.http |
High level HTTP and WebSocket API
|
java.util |
Contains the collections framework, legacy collection classes,
event model, date and time facilities, internationalization, and
miscellaneous utility classes (a string tokenizer, a random-number
generator, and a bit array).
|
java.util.stream |
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
|
Modifier and Type | Method and Description |
---|---|
Optional<String[]> |
ProcessHandle.Info.arguments()
Returns an array of Strings of the arguments of the process.
|
Optional<Integer> |
Runtime.Version.build()
Returns the build number.
|
Optional<String> |
ProcessHandle.Info.command()
Returns the executable pathname of the process.
|
Optional<String> |
ProcessHandle.Info.commandLine()
Returns the command line of the process.
|
static Optional<ProcessHandle> |
ProcessHandle.of(long pid)
Returns an
Optional<ProcessHandle> for an existing native process. |
Optional<String> |
Runtime.Version.optional()
Returns optional additional identifying build
information.
|
Optional<ProcessHandle> |
ProcessHandle.parent()
Returns an
Optional<ProcessHandle> for the parent process. |
Optional<String> |
Runtime.Version.pre()
Returns the optional pre-release information.
|
Optional<Instant> |
ProcessHandle.Info.startInstant()
Returns the start time of the process.
|
Optional<Duration> |
ProcessHandle.Info.totalCpuDuration()
Returns the total cputime accumulated of the process.
|
Optional<String> |
ProcessHandle.Info.user()
Return the user of the process.
|
Modifier and Type | Method and Description |
---|---|
Optional<ModuleReference> |
ModuleFinder.find(String name)
Finds a reference to a module of a given name.
|
Optional<URI> |
ModuleReader.find(String name)
Finds a resource, returning a URI to the resource in the module.
|
Optional<ResolvedModule> |
Configuration.findModule(String name)
Finds a resolved module in this configuration, or if not in this
configuration, the parent configurations.
|
Optional<URI> |
ModuleReference.location()
Returns the location of this module's content, if known.
|
Optional<String> |
ModuleDescriptor.mainClass()
Returns the module's main class.
|
default Optional<InputStream> |
ModuleReader.open(String name)
Opens a resource, returning an input stream to read the resource in
the module.
|
Optional<String> |
ModuleDescriptor.osArch()
Returns the operating system architecture if this module is operating
system architecture specific.
|
Optional<String> |
ModuleDescriptor.osName()
Returns the operating system name if this module is operating system
specific.
|
Optional<String> |
ModuleDescriptor.osVersion()
Returns the operating system version if this module is operating
system version specific.
|
Optional<Configuration> |
Configuration.parent()
Returns this configuration's parent unless this is the empty configuration, which has no parent.
|
default Optional<ByteBuffer> |
ModuleReader.read(String name)
Reads a resource, returning a byte buffer with the contents of the
resource.
|
Optional<ModuleDescriptor.Version> |
ModuleDescriptor.version()
Returns this module's version.
|
Modifier and Type | Method and Description |
---|---|
Optional<Module> |
Layer.findModule(String name)
Returns the module with the given name in this layer, or if not in this
layer, the parent layer.
|
Optional<Layer> |
Layer.parent()
Returns this layer's parent unless this is the empty
layer, which has no parent.
|
Modifier and Type | Method and Description |
---|---|
abstract Optional<Authenticator> |
HttpClient.authenticator()
Returns an
Optional containing the Authenticator set on
this client. |
abstract Optional<CookieManager> |
HttpClient.cookieManager()
Returns an
Optional which contains this client's CookieManager . |
Optional<String> |
HttpHeaders.firstValue(String name)
Returns an
Optional containing the first value of the
given named (and possibly multi-valued) header. |
Optional<Long> |
HttpHeaders.firstValueAsLong(String name)
Returns an
Optional containing the first value of the
named header field as an Optional<Long>. |
abstract Optional<ProxySelector> |
HttpClient.proxy()
Returns an
Optional containing the ProxySelector for this client. |
abstract Optional<SSLParameters> |
HttpClient.sslParameters()
Returns an
Optional containing the SSLParameters set on
this client. |
Modifier and Type | Method and Description |
---|---|
default void |
WebSocket.Listener.onClose(WebSocket webSocket,
Optional<WebSocket.CloseCode> code,
String reason)
Receives a Close message.
|
Modifier and Type | Method and Description |
---|---|
static <T> Optional<T> |
Optional.empty()
Returns an empty
Optional instance. |
Optional<T> |
Optional.filter(Predicate<? super T> predicate)
If a value is present, and the value matches the given predicate,
returns an
Optional describing the value, otherwise returns an
empty Optional . |
<U> Optional<U> |
Optional.flatMap(Function<? super T,Optional<U>> mapper)
If a value is present, returns the result of applying the given
Optional -bearing mapping function to the value, otherwise returns
an empty Optional . |
<U> Optional<U> |
Optional.map(Function<? super T,? extends U> mapper)
If a value is present, returns an
Optional describing (as if by
ofNullable(T) ) the result of applying the given mapping function to
the value, otherwise returns an empty Optional . |
static <T> Optional<T> |
Optional.of(T value)
Returns an
Optional describing the given non-null
value. |
static <T> Optional<T> |
Optional.ofNullable(T value)
Returns an
Optional describing the given value, if
non-null , otherwise returns an empty Optional . |
Optional<T> |
Optional.or(Supplier<Optional<T>> supplier)
If a value is present, returns an
Optional describing the value,
otherwise returns an Optional produced by the supplying function. |
Modifier and Type | Method and Description |
---|---|
<U> Optional<U> |
Optional.flatMap(Function<? super T,Optional<U>> mapper)
If a value is present, returns the result of applying the given
Optional -bearing mapping function to the value, otherwise returns
an empty Optional . |
Optional<T> |
Optional.or(Supplier<Optional<T>> supplier)
If a value is present, returns an
Optional describing the value,
otherwise returns an Optional produced by the supplying function. |
Modifier and Type | Method and Description |
---|---|
Optional<T> |
Stream.findAny()
Returns an
Optional describing some element of the stream, or an
empty Optional if the stream is empty. |
Optional<T> |
Stream.findFirst()
Returns an
Optional describing the first element of this stream,
or an empty Optional if the stream is empty. |
Optional<T> |
Stream.max(Comparator<? super T> comparator)
Returns the maximum element of this stream according to the provided
Comparator . |
Optional<T> |
Stream.min(Comparator<? super T> comparator)
Returns the minimum element of this stream according to the provided
Comparator . |
Optional<T> |
Stream.reduce(BinaryOperator<T> accumulator)
Performs a reduction on the
elements of this stream, using an
associative accumulation
function, and returns an
Optional describing the reduced value,
if any. |
Modifier and Type | Method and Description |
---|---|
static <T> Collector<T,?,Optional<T>> |
Collectors.maxBy(Comparator<? super T> comparator)
Returns a
Collector that produces the maximal element according
to a given Comparator , described as an Optional<T> . |
static <T> Collector<T,?,Optional<T>> |
Collectors.minBy(Comparator<? super T> comparator)
Returns a
Collector that produces the minimal element according
to a given Comparator , described as an Optional<T> . |
static <T> Collector<T,?,Optional<T>> |
Collectors.reducing(BinaryOperator<T> op)
Returns a
Collector which performs a reduction of its
input elements under a specified BinaryOperator . |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-06-25-232344.buildd.src