modernize classes of sandbox components

- modernizes classes to use a Java8+ code style (generics, ...)
- rewrites some old c-style array declarations
- adds final modifier where applicable
- switches to enhanced for-loop pattern where applicable
- removes unnecessary / useless variable initializations
- fixes compareTo implementations that violated the contract for equality
- adds static modifier for inner classes
- replaces `String#indexOf(..) < ..` checks with `String#contains(..)`
- replaces StringBuffer with StringBuilder
- removes unused imports
- removes superfluous toString() calls
- modernizes resource handling along the path
231 files changed