First they ignore you
then they ridicule you
then they fight you
then you win
    -- Mahatma Gandhi
Chinese => English     英文 => 中文             
随笔-221  评论-1047  文章-0  trackbacks-0
08 2016 档案
Groovy高效编程——Option模式的实现与应用      摘要: Groovy和Java都习惯使用null来表示“空”这一概念,而对null的操作将引发NullPointerException(简写为NPE),进而影响系统的健壮性。为了避免NPE,Option模式应运而生,通过Option类型来标识NPE风险,其使用None对象表示“空”,并使用Some对象表示“非空”且持有值对象,最终提升了系统健壮性。  阅读全文
posted @ 2016-08-13 16:17 山风小子| 编辑