Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6237 Specified list implementation. #6267

Merged
merged 1 commit into from
Nov 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,18 @@ public AbstractChart setYBound(double lower, double upper) {
return this;
}

public AbstractChart setYBound(List bound) {
public AbstractChart setYBound(List<Number> bound) {
if (bound.size() != 2) {
throw new IllegalArgumentException("to set the y bound, the list needs to be of size=2");
}
if (!(bound.get(0) instanceof Number) || !(bound.get(1) instanceof Number)) {
throw new IllegalArgumentException("the elements in the list needs to be numbers");
}
Number n0 = (Number) bound.get(0);
Number n1 = (Number) bound.get(1);

Number n0 = bound.get(0);
Number n1 = bound.get(1);
setYBound(n0.doubleValue(), n1.doubleValue());
return this;
}

public AbstractChart setyBound(List bound) {
public AbstractChart setyBound(List<Number> bound) {
return this.setYBound(bound);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,18 @@ public XYChart setXBound(double lower, double upper) {
return this;
}

public XYChart setXBound(List bound) {
public XYChart setXBound(List<Number> bound) {
if (bound.size() != 2) {
throw new IllegalArgumentException("to set the x bound, the list needs to be of size=2");
}
if (!(bound.get(0) instanceof Number) || !(bound.get(1) instanceof Number)) {
throw new IllegalArgumentException("the elements in the list needs to be numbers");
}
Number n0 = (Number) bound.get(0);
Number n1 = (Number) bound.get(1);

Number n0 = bound.get(0);
Number n1 = bound.get(1);
setXBound(n0.doubleValue(), n1.doubleValue());
return this;
}

public XYChart setxBound(List bound) {
public XYChart setxBound(List<Number> bound) {
return this.setXBound(bound);
}

Expand Down