public boolean equalsPoly(Polynomial n) { if (this.getDegree() != n.getDegree()) return false; for (int i = 0; i <= this.getDegree(); ++i) if (!baseRing.equals(this.getCoeff(i), n.getCoeff(i))) return false; return true; }