package hudson.plugins.git;
import hudson.scm.ChangeLogSet;
import hudson.model.AbstractBuild;
import java.util.List;
import java.util.Collections;
import java.util.Iterator;
/**
* List of changeset that went into a particular build.
* @author Nigel Magnay
*/
public class GitChangeSetList extends ChangeLogSet<GitChangeSet> {
private final List<GitChangeSet> changeSets;
/*package*/ GitChangeSetList(AbstractBuild build, List<GitChangeSet> logs) {
super(build);
Collections.reverse(logs); // put new things first
this.changeSets = Collections.unmodifiableList(logs);
for (GitChangeSet log : logs)
log.setParent(this);
}
public boolean isEmptySet() {
return changeSets.isEmpty();
}
public Iterator<GitChangeSet> iterator() {
return changeSets.iterator();
}
public List<GitChangeSet> getLogs() {
return changeSets;
}
}