public void removeEntriesWithPathForAuthor(String path, String author) { if (logEntries == null || logEntries.isEmpty()) { return; } int count = logEntries.size(); int i = 0; while (i < count) { LogEntry logEntry = logEntries.get(i); if (!logEntry.getAuthor().equals(author)) { i++; continue; } logEntry.removeEntriesWithPath(path); if (logEntry.isEmpty()) { logEntries.remove(logEntry); count--; continue; } i++; } isOrdered = false; }
public void removeNotLastModifications() { List<String> uniquePaths = getUniquePaths(); for (String path : uniquePaths) { int lastRevision = getLastModificationRevisionForPath(path); int count = logEntries.size(); int i = 0; while (i < count) { LogEntry entry = logEntries.get(i); if (entry.getRevision() < lastRevision) { entry.removeEntriesWithPath(path); if (entry.isEmpty()) { logEntries.remove(entry); count--; i--; } } i++; } } isOrdered = false; }
public void removeEntriesWithPath(String path) { if (logEntries == null || logEntries.isEmpty()) { return; } int count = logEntries.size(); int i = 0; while (i < count) { LogEntry logEntry = logEntries.get(i); logEntry.removeEntriesWithPath(path); if (logEntry.isEmpty()) { logEntries.remove(logEntry); count--; continue; } i++; } isOrdered = false; }