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 Summary
Constructors Constructor Description PatchList(org.eclipse.jgit.lib.AnyObjectId oldId, org.eclipse.jgit.lib.AnyObjectId newId, boolean isMerge, ComparisonType comparisonType, PatchListEntry[] patches)
-
Method Summary
All 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.
-
-
-
Constructor Detail
-
PatchList
public PatchList(org.eclipse.jgit.lib.AnyObjectId oldId, org.eclipse.jgit.lib.AnyObjectId newId, boolean isMerge, ComparisonType comparisonType, PatchListEntry[] patches)
-
-
Method Detail
-
getOldId
public org.eclipse.jgit.lib.ObjectId getOldId()
Old side tree or commit; null only if this is a combined diff.
-
getNewId
public org.eclipse.jgit.lib.ObjectId getNewId()
New side commit.
-
getPatches
public List<PatchListEntry> getPatches()
Get a sorted, unmodifiable list of all files in this list.
-
getComparisonType
public ComparisonType getComparisonType()
- Returns:
- the comparison type
-
getInsertions
public int getInsertions()
- Returns:
- total number of new lines added.
-
getDeletions
public int getDeletions()
- Returns:
- total number of lines removed.
-
get
public PatchListEntry get(String fileName)
Find an entry by name, returning an empty entry if not present.
-
-