MATH-336 Unnecessary null checks in equals methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@922714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
88e4b16f64
commit
012a6ed4fc
|
@ -341,8 +341,6 @@ public class PolynomialFunction implements DifferentiableUnivariateRealFunction,
|
|||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (!(obj instanceof PolynomialFunction))
|
||||
return false;
|
||||
PolynomialFunction other = (PolynomialFunction) obj;
|
||||
|
|
|
@ -778,9 +778,6 @@ public class OpenMapRealVector extends AbstractRealVector implements SparseRealV
|
|||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof OpenMapRealVector)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -615,10 +615,6 @@ public class SparseFieldVector<T extends FieldElement<T>> implements FieldVector
|
|||
return true;
|
||||
}
|
||||
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(obj instanceof SparseFieldVector<?>)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -135,8 +135,6 @@ public class VectorialCovariance implements Serializable {
|
|||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (!(obj instanceof VectorialCovariance))
|
||||
return false;
|
||||
VectorialCovariance other = (VectorialCovariance) obj;
|
||||
|
|
|
@ -92,8 +92,6 @@ public class VectorialMean implements Serializable {
|
|||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (!(obj instanceof VectorialMean))
|
||||
return false;
|
||||
VectorialMean other = (VectorialMean) obj;
|
||||
|
|
Loading…
Reference in New Issue