delete files that were used for tests
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
package com.r11.xpath;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "task")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
public class Task {
|
||||
|
||||
@XmlAttribute
|
||||
private int id;
|
||||
|
||||
private String name;
|
||||
private String xpath;
|
||||
|
||||
public Task() {
|
||||
}
|
||||
|
||||
public Task(int id, String name, String xpath) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.xpath = xpath;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getXPath() {
|
||||
return xpath;
|
||||
}
|
||||
|
||||
public void setXpath(String xpath) {
|
||||
this.xpath = xpath;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.r11.xpath;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@XmlRootElement(name = "tasks")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
public class TasksContainer {
|
||||
|
||||
@XmlElement(name = "task")
|
||||
private final List<Task> tasks = new ArrayList<>();
|
||||
|
||||
public List<Task> getTasks() {
|
||||
tasks.sort(Comparator.comparingInt(Task::getId));
|
||||
return tasks;
|
||||
}
|
||||
|
||||
public Task getOne(int id) {
|
||||
return tasks.stream()
|
||||
.filter(b -> b.getId() == id)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user