Skip to content

Instantly share code, notes, and snippets.

@josiahhaswell
Created January 10, 2019 04:32
Show Gist options
  • Save josiahhaswell/b8048387d08afa2669d3432dbf0c2aed to your computer and use it in GitHub Desktop.
Save josiahhaswell/b8048387d08afa2669d3432dbf0c2aed to your computer and use it in GitHub Desktop.
@Getter
@Setter
@XmlRootElement
public class LinearSolution extends AbstractElement<LinearSolution> {
@XmlAttribute(name = "solution-type")
private SolutionType solutionType;
@XmlElement(name = "statistic")
@XmlElementWrapper(name = "statistics")
private List<Statistic> statistics = new ArrayList<>();
@XmlElement(name = "term")
@XmlElementWrapper(name = "terms")
private List<SolutionTerm> terms = new ArrayList<>();
public void addStatistic(Statistic statistic) {
statistics.add(statistic);
}
public void addSolutionTerm(SolutionTerm variable) {
terms.add(variable);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment