Example #1
0
  public List<LogEntry> getOrderedLogEntries() {
    if (!isOrdered) {
      Collections.sort(logEntries, LogEntryComparator.instance());
      isOrdered = true;
    }

    return logEntries;
  }
Example #2
0
  public List<LogEntry> getOrderedAuthorLogEntries(String author) {
    List<LogEntry> entries = getUnorderedAuthorLogEntries(author);
    Collections.sort(entries, LogEntryComparator.instance());

    return entries;
  }