0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Entityがnullかどうかを知る

Posted at

背景

javaの資材を修正した際に、作成されたentityListがnullかどうかで条件分岐した箇所があった。そこで自分は、CollectionとEntityをごっちゃにして考え、null判定をするためにメソッドを理解するのに時間を要した。そこで、メモとしてここに書き留めておく

EntityがNullかどうか判定する

"isNull", "nonNull","==null", "!=null"の4つ。
直観的にわかりやすいのは"isNull", "nonNull"かと思う

Listの中身がnullかどうか

"isEmpty()","list.size()==0"

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?