new plotter

This commit is contained in:
Sergey Solovyev
2013-01-06 00:59:35 +04:00
parent 2c0803da74
commit b0608b8204
17 changed files with 350 additions and 115 deletions

View File

@@ -85,7 +85,13 @@ public enum CalculatorDisplayMenuItem implements LabeledMenuItem<CalculatorDispl
assert generic != null;
final List<Constant> variables = new ArrayList<Constant>(CalculatorUtils.getNotSystemConstants(generic));
final Constant xVariable = variables.get(0);
final Constant xVariable;
if ( variables.size() > 0 ) {
xVariable = variables.get(0);
} else {
xVariable = null;
}
final Constant yVariable;
if ( variables.size() > 1 ) {

View File

@@ -15,7 +15,7 @@ public class PlotInput {
@NotNull
private Generic function;
@NotNull
@Nullable
private Constant xVariable;
@Nullable
@@ -26,7 +26,7 @@ public class PlotInput {
@NotNull
public static PlotInput newInstance(@NotNull Generic function,
@NotNull Constant xVariable,
@Nullable Constant xVariable,
@Nullable Constant yVariable) {
PlotInput result = new PlotInput();
@@ -42,7 +42,7 @@ public class PlotInput {
return function;
}
@NotNull
@Nullable
public Constant getXVariable() {
return xVariable;
}