package ru.nsu.ccfit.bogush.message.types;

import ru.nsu.ccfit.bogush.User;
import ru.nsu.ccfit.bogush.message.Message;
import ru.nsu.ccfit.bogush.message.MessageHandler;

public class Text implements Message {
	private User author;
	private String text;

	public Text(User author, String text) {
		this.author = author;
		this.text = text;
	}

	public User getAuthor() {
		return author;
	}

	public String getText() {
		return text;
	}

	@Override
	public void handleBy(MessageHandler handler) {
		handler.handle(this);
	}

	@Override
	public String toString() {
		return new StringBuilder()
				.append("[")
				.append(getAuthor())
				.append(": \"")
				.append(getText())
				.append("\"]")
				.toString();
	}
}

@@ -429,24 +429,104 @@
 n text;%0A%09%7D%0A%0A
+%09public String getVerboseText() %7B%0A%09%09return text.replaceAll(%22%5C%5Cp%7BC%7D%22, %22%5B%5D%22);%0A%09%7D%0A%0A
 %09@Override%0A%09
@@ -745,16 +745,23 @@
 pend(get
+Verbose
 Text())%0A

Add getVerboseText() and use it in toString()