Example usage for org.eclipse.jgit.util BlockList BlockList

List of usage examples for org.eclipse.jgit.util BlockList BlockList

Introduction

In this page you can find the example usage for org.eclipse.jgit.util BlockList BlockList.

Prototype

public BlockList() 

Source Link

Document

Initialize an empty list.

Usage

From source file:com.google.gerrit.pgm.ExportReviewNotes.java

License:Apache License

private Map<Project.NameKey, List<Change>> cluster(List<Change> changes) {
    HashMap<Project.NameKey, List<Change>> m = new HashMap<Project.NameKey, List<Change>>();
    for (Change change : changes) {
        if (change.getStatus() == Change.Status.MERGED) {
            List<Change> l = m.get(change.getProject());
            if (l == null) {
                l = new BlockList<Change>();
                m.put(change.getProject(), l);
            }//from   ww  w . jav  a 2 s  . c  o m
            l.add(change);
        } else {
            monitor.update(1);
        }
    }
    return m;
}