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

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

    return entries;
  }