commit 55c531c9f17192883661b75e2f6aeba7d8fd8e19 Author: Alice Kober-Sotzek Date: Thu Sep 24 13:33:27 2020 +0200 EditList: Remove unused methods Change-Id: I2b824c2489981eb0d4c99a4d4bbfa6b89b95b7d0 diff --git a/java/com/google/gerrit/prettify/common/EditList.java b/java/com/google/gerrit/prettify/common/EditList.java index 172a346..904995a 100644 --- a/java/com/google/gerrit/prettify/common/EditList.java +++ b/java/com/google/gerrit/prettify/common/EditList.java @@ -31,10 +31,6 @@ public class EditList { this.bSize = bSize; } - public List getEdits() { - return edits; - } - public Iterable getHunks() { return () -> new Iterator() { @@ -86,7 +82,6 @@ public class EditList { private int curIdx; private Edit curEdit; private final int endIdx; - private final Edit endEdit; private int aCur; private int bCur; @@ -97,7 +92,7 @@ public class EditList { curIdx = ci; endIdx = ei; curEdit = edits.get(curIdx); - endEdit = edits.get(endIdx); + Edit endEdit = edits.get(endIdx); aCur = Math.max(0, curEdit.getBeginA() - context); bCur = Math.max(0, curEdit.getBeginB() - context); @@ -113,18 +108,6 @@ public class EditList { return bCur; } - public Edit getCurEdit() { - return curEdit; - } - - public int getEndA() { - return aEnd; - } - - public int getEndB() { - return bEnd; - } - public void incA() { aCur++; } @@ -138,12 +121,8 @@ public class EditList { incB(); } - public boolean isStartOfFile() { - return aCur == 0 && bCur == 0; - } - public boolean isContextLine() { - return !isModifiedLine(); + return !isDeletedA() && !isInsertedB(); } public boolean isDeletedA() { @@ -154,10 +133,6 @@ public class EditList { return curEdit.getBeginB() <= bCur && bCur < curEdit.getEndB(); } - public boolean isModifiedLine() { - return isDeletedA() || isInsertedB(); - } - public boolean next() { if (!in(curEdit)) { if (curIdx < endIdx) {