Update WavePattern.java

Equal will not rely on hashCode for equality, but use actual equality check