mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 11:37:41 +01:00
Rename 'message' to 'content'
Use 'p' in Message#toArray(Serializable...)
This commit is contained in:
parent
f2ce603f37
commit
a060182e49
@ -10,34 +10,34 @@ import java.io.Serializable;
|
||||
*/
|
||||
public class Message {
|
||||
|
||||
private final String message;
|
||||
private final String content;
|
||||
|
||||
public Message(String message) {
|
||||
this.message = message;
|
||||
public Message(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String parse(Serializable... p) {
|
||||
String returnValue = this.message;
|
||||
String returnValue = this.content;
|
||||
for (int i = 0; i < p.length; i++) {
|
||||
returnValue = returnValue.replace("REPLACE" + i, p[i].toString());
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return message;
|
||||
public String[] toArray() {
|
||||
return content.split("\\\\");
|
||||
}
|
||||
|
||||
public String[] toArray(Serializable... p) {
|
||||
return parse(p).split("\\\\");
|
||||
}
|
||||
|
||||
public String parse() {
|
||||
return toString();
|
||||
}
|
||||
|
||||
public String[] toArray() {
|
||||
return message.split("\\\\");
|
||||
}
|
||||
|
||||
public String[] toArray(Serializable... p) {
|
||||
return parse().split("\\\\");
|
||||
@Override
|
||||
public String toString() {
|
||||
return content;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user