I am trying to check if a Java String is not null, not empty and not whitespace.
null
In my mind, this code should have been quite up for the job.
I would choose isBlank() over isEmpty() because trim() creates a new String object that has to be garbage collected later. isBlank() on the other hand does not create any objects.
isBlank()
isEmpty()
trim()