Add parametric types

Use `java.util.Objects`