[WIP] Java Optional

創建: 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.
   
   
   
   
   
   
   
   
   
   
   
   
   
   

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章