private List<LogEntry> getUnorderedAuthorLogEntries(String author) { List<LogEntry> entries = new LinkedList<LogEntry>(); for (LogEntry logEntry : logEntries) { if (logEntry.getAuthor().equals(author)) { entries.add(logEntry); } } return entries; }
public List<String> getAuthors() { List<String> authors = new LinkedList<String>(); for (LogEntry logEntry : logEntries) { if (!authors.contains(logEntry.getAuthor())) { authors.add(logEntry.getAuthor()); } } Collections.sort(authors); return authors; }
public List<String> getUniquePaths() { List<String> uniquePathEntries = new LinkedList<String>(); for (LogEntry logEntry : logEntries) { List<PathEntry> pathEntries = logEntry.getPathEntries(); for (PathEntry pathEntry : pathEntries) { if (!uniquePathEntries.contains(pathEntry.getPath())) { uniquePathEntries.add(pathEntry.getPath()); } } } return uniquePathEntries; }
public List<PathEntry> getOrderedByRevisionAuthorPathEntries(String author) { List<PathEntry> orderedPathEntries = new LinkedList<PathEntry>(); List<LogEntry> logEntries = getUnorderedAuthorLogEntries(author); for (LogEntry logEntry : logEntries) { List<PathEntry> pathEntries = logEntry.getPathEntries(); for (PathEntry pathEntry : pathEntries) { orderedPathEntries.add(pathEntry); } } Collections.sort(orderedPathEntries); return orderedPathEntries; }
public List<String> getAuthorUniquePaths(String author) { List<LogEntry> logEntries = getUnorderedAuthorLogEntries(author); List<String> uniquePathEntries = new LinkedList<String>(); for (LogEntry logEntry : logEntries) { List<PathEntry> pathEntries = logEntry.getPathEntries(); for (PathEntry pathEntry : pathEntries) { if (!uniquePathEntries.contains(pathEntry.getPath())) { uniquePathEntries.add(pathEntry.getPath()); } } } return uniquePathEntries; }
public void addLogEntry(LogEntry logEntry) { logEntries.add(logEntry); isOrdered = false; }