Using java.util.Arrays class when calculating hashcode and equals