Add type parameters to polymorphic methods.
Updated java version to 1.8.
Remove unnecessary if statement.
Remove unnecessary break label.
Remove redundant initial values.
Remove inferred type parameters.
Replace anonymous classes with lambdas.
Replace loop with stream API.
Update Travis config to use Java 8.