Chenges to isEmpty method
Adding Java docs