Implement equals for trigonometric functions

This commit is contained in:
Riccardo Azzolini 2018-10-06 18:38:39 +02:00
parent 2ca5a8391a
commit 54fc13b211
5 changed files with 30 additions and 5 deletions

View File

@ -17,7 +17,12 @@ public class ArcCosine extends FunctionSingle {
@Override
public boolean equals(final Object o) {
// TODO Auto-generated method stub
if (o instanceof ArcCosine) {
final FunctionSingle f = (FunctionSingle) o;
if (parameter.equals(f.getParameter())) {
return true;
}
}
return false;
}

View File

@ -17,7 +17,12 @@ public class ArcSine extends FunctionSingle {
@Override
public boolean equals(final Object o) {
// TODO Auto-generated method stub
if (o instanceof ArcSine) {
final FunctionSingle f = (FunctionSingle) o;
if (parameter.equals(f.getParameter())) {
return true;
}
}
return false;
}

View File

@ -17,7 +17,12 @@ public class ArcTangent extends FunctionSingle {
@Override
public boolean equals(final Object o) {
// TODO Auto-generated method stub
if (o instanceof ArcTangent) {
final FunctionSingle f = (FunctionSingle) o;
if (parameter.equals(f.getParameter())) {
return true;
}
}
return false;
}

View File

@ -17,7 +17,12 @@ public class Cosine extends FunctionSingle {
@Override
public boolean equals(final Object o) {
// TODO Auto-generated method stub
if (o instanceof Cosine) {
final FunctionSingle f = (FunctionSingle) o;
if (parameter.equals(f.getParameter())) {
return true;
}
}
return false;
}

View File

@ -16,7 +16,12 @@ public class Tangent extends FunctionSingle {
@Override
public boolean equals(final Object o) {
// TODO Auto-generated method stub
if (o instanceof Tangent) {
final FunctionSingle f = (FunctionSingle) o;
if (parameter.equals(f.getParameter())) {
return true;
}
}
return false;
}