--- ----------------------------------------------最好用英语的思维形象理解 ,学术式研究 无法深入理解
关于faltMap 和stream
stream is stream map is map ,流中只能有一类元素
flatMap 把原来流中大颗粒元素压扁拆分合并到一个流中,让流更平 ,类似执行了两次stream map 但是进行了合并到一个流里。
然而,单纯执行两边 stream + map ,搞来搞去还是在两个不同的流。
--
Returns a stream/ consisting of the results of ///replacing /each element of
this stream /with the contents of a mapped stream/ produced by applying
the provided mapping function to each element. Each mapped stream is
{@link java.util.stream.BaseStream#close() closed} after its contents
have been placed into this stream. (If a mapped stream is {@code null}
an empty stream is used, instead.)
---
关于 option
option就是套一层皮 防NPE还是要提前判断或者去皮 orelse orget ifpresent
sor/main+test
main/java+resource
test/java+resource
---
泛型 声明/定义的位置
((((类名))))后 <<<方法返回值类型>>>前
lambda 1进+ 1出