約91,900件1ページ目

日本語のみで絞り込む

A container object which may or may not contain a non-null value. If a value is present, isPresent() will return true and get() will return the value.

他の人はこちらも質問

Optional is primarily intended for use as a method return type where there is a clear need to represent "no result," and where using null is likely to cause ...

Provides classes and interfaces for key specifications and algorithm parameter specifications. java.util. Contains the collections framework, some ...

java.util. Overview. Interfaces. Collection · Comparator · Deque · Enumeration ... Optional · OptionalDouble · OptionalInt · OptionalLong · PriorityQueue ...

2026/2/15 -In this tutorial, we're going to show the Optional class that was introduced in Java 8. The purpose of the class is to provide a type-level ...

* If a value is present, returns an {@code Optional} describing the value,. * otherwise returns an {@code Optional} produced by the supplying function. *. * @ ...

It is used in methods that wish to optionally return a value, in preference to returning null . In fact, the class here is a reimplementation of the essential ...

2011/12/4 -Set is an interface. Classes implementing that interface do not necessarily need to provide an implementation for an optional operation.

2026/10/10 -The source of java.util.Optional is short. An Optional keeps the value in one final field, and a null field means the Optional is empty. All ...