Package com.google.gerrit.server.patch
Class PatchList
- java.lang.Object
- 
- com.google.gerrit.server.patch.PatchList
 
- 
- All Implemented Interfaces:
- Serializable
 - Direct Known Subclasses:
- PatchListCacheImpl.LargeObjectTombstone
 
 public class PatchList extends Object implements Serializable - See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description PatchList(org.eclipse.jgit.lib.AnyObjectId oldId, org.eclipse.jgit.lib.AnyObjectId newId, boolean isMerge, ComparisonType comparisonType, PatchListEntry[] patches)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description PatchListEntryget(String fileName)Find an entry by name, returning an empty entry if not present.ComparisonTypegetComparisonType()intgetDeletions()intgetInsertions()org.eclipse.jgit.lib.ObjectIdgetNewId()New side commit.org.eclipse.jgit.lib.ObjectIdgetOldId()Old side tree or commit; null only if this is a combined diff.List<PatchListEntry>getPatches()Get a sorted, unmodifiable list of all files in this list.List<Patch>toPatchList(PatchSet.Id setId)Get a sorted, modifiable list of all files in this list.
 
- 
- 
- 
Constructor Detail- 
PatchListpublic PatchList(org.eclipse.jgit.lib.AnyObjectId oldId, org.eclipse.jgit.lib.AnyObjectId newId, boolean isMerge, ComparisonType comparisonType, PatchListEntry[] patches)
 
- 
 - 
Method Detail- 
getOldIdpublic org.eclipse.jgit.lib.ObjectId getOldId() Old side tree or commit; null only if this is a combined diff.
 - 
getNewIdpublic org.eclipse.jgit.lib.ObjectId getNewId() New side commit.
 - 
getPatchespublic List<PatchListEntry> getPatches() Get a sorted, unmodifiable list of all files in this list.
 - 
getComparisonTypepublic ComparisonType getComparisonType() - Returns:
- the comparison type
 
 - 
getInsertionspublic int getInsertions() - Returns:
- total number of new lines added.
 
 - 
getDeletionspublic int getDeletions() - Returns:
- total number of lines removed.
 
 - 
toPatchListpublic List<Patch> toPatchList(PatchSet.Id setId) Get a sorted, modifiable list of all files in this list.The returned list items do not populate: - Parameters:
- setId- the patch set identity these patches belong to. This really should not need to be specified, but is a current legacy artifact of how the cache is keyed versus how the database is keyed.
 
 - 
getpublic PatchListEntry get(String fileName) Find an entry by name, returning an empty entry if not present.
 
- 
 
-