Primitive types should be compared with .equals due to Java 8 type annotations also applicable to primitive types.