* Remove redundant escape char * Remove double negation * Replace while loop with forEach * Replace collections.sort with list.sort as its faster * Replace if/elseif chain with switch * Remove redundant call to format() * Use bulk operation instead of iteration * Remove unnecessary contains check * Remove redundant type casts