Пример #1
0
  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;
  }
Пример #2
0
  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;
  }
Пример #3
0
  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;
  }
Пример #4
0
  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;
  }
Пример #5
0
  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;
  }
Пример #6
0
 public void addLogEntry(LogEntry logEntry) {
   logEntries.add(logEntry);
   isOrdered = false;
 }