Skip to content
Snippets Groups Projects
Commit 92ab8a06 authored by maikov's avatar maikov
Browse files

Implemented clone.

parent 34e70032
No related branches found
No related tags found
No related merge requests found
......@@ -78,4 +78,9 @@ public class MatrixValue extends Value {
public String toString() {
return matrix.toString();
}
@Override
public Value clone() {
return new MatrixValue(Matrix.clone(this.matrix));
}
}
......@@ -64,4 +64,9 @@ public class Number extends Value {
public String toString() {
return Double.toString(number);
}
@Override
public Value clone() {
return new Number(this.number);
}
}
......@@ -2,6 +2,8 @@ package ee.ut.cs.gitlab.maikov.expressions;
public abstract class Value extends Expression implements MathOp {
public abstract Value clone();
@Override
public Expression compute() {
return this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment