創建: 2021/10/4
想想當年遇到新的,都會系統看一遍,把扁平的文字總結成一整張表格一樣的博客。這一年很少能靜下來這麼做了,年紀也增長了不少,那種單純的總結技術的時代似乎漸行漸遠了。
不管怎樣吧,從今天開始,以後也要靜下心老老實實總結。
references:
https://www.baeldung.com/java-optional
https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html
assign |
static Optional<T> empty() |
Returns an empty Optional instance. |
static Optional<T> of() |
Returns an Optional with the specified present non-null value. |
static Optional<T> ofNullable() |
Returns an Optional describing the specified value, if non-null, otherwise returns an empty Optional . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|