1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.maxur.perfmodel.backend.domain;
17
18 import javax.xml.bind.annotation.XmlRootElement;
19 import java.io.Serializable;
20 import java.util.List;
21
22 import static java.util.Arrays.stream;
23 import static java.util.stream.Collectors.toList;
24
25
26
27
28
29
30 @XmlRootElement
31 public class Incident implements Serializable {
32
33 private static final long serialVersionUID = 2368849548039200044L;
34
35 private String message;
36
37 @SuppressWarnings("UnusedDeclaration")
38 public Incident() {
39 }
40
41 public Incident(final String message) {
42 this.message = message;
43 }
44
45 public static List<Incident> incidents(final String... messages) {
46 return stream(messages).map(Incident::new).collect(toList());
47 }
48
49 @SuppressWarnings("UnusedDeclaration")
50 public String getMessage() {
51 return message;
52 }
53 }