delete files that were used for tests

This commit is contained in:
2024-06-03 15:29:10 +02:00
parent cf9470e6d0
commit 18191e3695
2 changed files with 0 additions and 79 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}
}