new plotter
This commit is contained in:
@@ -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 ) {
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user