{"published":"2024-06-16 09:44:18","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemo88.hatenablog.com%2Fentry%2Fjava-objects-isnull-nonnull-usage\" title=\"Java\u3067null\u5224\u5b9a: Objects.isNull \u3068 == null \u306e\u4f7f\u3044\u5206\u3051 - memo486\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Java\u3067null\u5224\u5b9a: Objects.isNull \u3068 == null \u306e\u4f7f\u3044\u5206\u3051","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/sonota88/","version":"1.0","blog_url":"https://memo88.hatenablog.com/","blog_title":"memo486","width":"100%","url":"https://memo88.hatenablog.com/entry/java-objects-isnull-nonnull-usage","provider_url":"https://hatena.blog","author_name":"sonota88","type":"rich","image_url":null,"description":"\u300c\u73fe\u6642\u70b9\u3067\u81ea\u5206\u304c\u6301\u3063\u3066\u3044\u308b\u77e5\u8b58\u3067\u5224\u65ad\u3059\u308b\u3068\u3053\u3046\u306a\u308b\u300d\u3068\u3044\u3046\u500b\u4eba\u7684\u898b\u89e3\u3067\u3059 \u9593\u9055\u3063\u3066\u305f\u3089\u3054\u3081\u3093\u306a\u3055\u3044 \u5c06\u6765\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059 \u3053\u306e\u8a18\u4e8b\u3067\u306f isNull \u3068 == \u3092\u6271\u3063\u3066\u3044\u307e\u3059\u304c\u3001 nonNull \u3068 != \u306b\u3064\u3044\u3066\u3082\u540c\u69d8\u3067\u3059 \u9ad8\u968e\u95a2\u6570\u3067\u306f\u306a\u3044\u5834\u5408 // \u3053\u3063\u3061\u3067\u66f8\u304f if (x == null) { // ... } // \u8aad\u307f\u3084\u3059\u3055\u30fb\u66f8\u304d\u3084\u3059\u3055\u306e\u4e21\u9762\u3067\u5fae\u5999\u306a\u306e\u3067\u907f\u3051\u308b // \uff08\u308f\u3056\u308f\u3056\u3053\u3046\u66f8\u304f\u30e1\u30ea\u30c3\u30c8\u304c\u306a\u3055\u305d\u3046\uff09 if (Objects.isNull(x)) { // ... } \u9ad8\u968e\u95a2\u6570\u306e\u5834\u5408 // \u30e9\u30e0\u30c0\u5f0f fooObj.fooMethod(x -> x == null\u2026","categories":["Java"]}