-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextSection.java
More file actions
50 lines (39 loc) · 1.29 KB
/
TextSection.java
File metadata and controls
50 lines (39 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.urise.webapp.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import java.util.Objects;
@XmlAccessorType(XmlAccessType.FIELD)
public class TextSection extends AbstractSection {
private static final long serialVersionUID = 1L;
private String textSection;
public TextSection() {
this.textSection = "textSection";
}
public TextSection(String textSection) {
this.textSection = textSection;
}
// public TextSection(String[] text) {
// this.textSection = Arrays.stream(text).reduce((s1, s2) -> new StringBuilder().append(s1).append(' ').append(s2).toString()).get();
// }
public String getTextSection() {
return textSection;
}
public void setTextSection(String textSection) {
this.textSection = textSection;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TextSection that = (TextSection) o;
return getTextSection().equals(that.getTextSection());
}
@Override
public int hashCode() {
return Objects.hash(getTextSection());
}
@Override
public String toString() {
return getTextSection();
}
}