-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextSection.java
More file actions
38 lines (29 loc) · 791 Bytes
/
TextSection.java
File metadata and controls
38 lines (29 loc) · 791 Bytes
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
package com.learnjava.model;
public class TextSection extends Section {
public static final TextSection EMPTY = new TextSection("");
private String content;
public TextSection(String content) {
this.content = content;
}
@SuppressWarnings("unused")
public TextSection() {
}
public String getContent() {
return content;
}
@Override
public String toString() {
return content;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TextSection that = (TextSection) o;
return content.equals(that.content);
}
@Override
public int hashCode() {
return content.hashCode();
}
}