change hashCode implementations to avoid array creation due to varargs