package buttondevteam.thebuttonmcchat; import java.util.ArrayList; import java.util.Collection; class FormattedSection { public int Start; public int End; public ArrayList Formatters = new ArrayList(); public ArrayList Matches = new ArrayList(); public FormattedSection(ChatFormatter formatter, int start, int end, ArrayList matches) { Start = start; End = end; Formatters.add(formatter); Matches.addAll(matches); } public FormattedSection(Collection formatters, int start, int end, ArrayList matches) { Start = start; End = end; Formatters.addAll(formatters); Matches.addAll(matches); } @Override public String toString() { return new StringBuilder("Section(").append(Start).append(", ").append(End).append(", formatters: ") .append(Formatters.toString()).append(", matches: ").append(Matches.toString()).append(")") .toString(); } }