fixed hints, refactor method
yoda condition ;-)
simplify, added java doc, refactor