JavaDoc, faster equals method
from String to CharSequence, accepted set as final
use streams, annotations for overrided methods
removed exception for maximum depth, will require many heavy changes or to be simply ignored
add final,add  ovveride annotations, remove old comments
grammar in comments
diamond operator, isEmpty instead of size==0
diamond operator, each instead of for cycle
detect matching cycles and avoid useless recursion