@Override public boolean equals(Object obj){
  if (!(obj instanceof PolynomialFunction2D)) {
    return false;
  }
  PolynomialFunction2D that=(PolynomialFunction2D)obj;
  return Arrays.equals(this.coefficients,that.coefficients);
}

@ Override public boolean equals ( Object obj ) { if ( ! ( obj instanceof PolynomialFunction2D ) ) { return false ; } PolynomialFunction2D that = ( PolynomialFunction2D ) obj ; return Arrays . equals ( this . coefficients , that . coefficients ) ; }
tests this function for equality with an arbitrary object .
