Skip to content

Commit 52a48dd

Browse files
Apply suggestions from code review
Co-authored-by: Julian Kast <Julian.kast@livio.io>
1 parent d0a7625 commit 52a48dd

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

base/src/main/java/com/smartdevicelink/managers/screen/menu/DynamicMenuUpdateAlgorithm.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.List;
55

66
class DynamicMenuUpdateAlgorithm {
7-
// Cell state that tells the menu manager what it should do with a given SDLMenuCell
7+
// Cell state that tells the menu manager what it should do with a given MenuCell
88
enum MenuCellState {
99
DELETE, // Marks the cell to be deleted
1010
ADD, // Marks the cell to be added
@@ -33,7 +33,7 @@ private static DynamicMenuUpdateRunScore startCompareAtRun(int startRun, List<Me
3333
DynamicMenuUpdateRunScore bestScore = new DynamicMenuUpdateRunScore(new ArrayList<MenuCellState>(), new ArrayList<MenuCellState>(), 0);
3434

3535
for (int run = startRun; run < oldMenuCells.size(); run++) {
36-
// Set the menu status as a 1-1 array, start off will oldMenus = all Deletes, newMenu = all Adds
36+
// Set the menu status as a 1-1 list, start off will oldMenus = all Deletes, newMenu = all Adds
3737
List<MenuCellState> oldMenuStatus = buildAllDeleteStatusesForMenu(oldMenuCells);
3838
List<MenuCellState> newMenuStatus = buildAllAddStatusesForMenu(updatedMenuCells);
3939

@@ -52,7 +52,7 @@ private static DynamicMenuUpdateRunScore startCompareAtRun(int startRun, List<Me
5252
}
5353
}
5454

55-
// // Add RPC are the biggest operation so we need to find the run with the least amount of Adds.
55+
// Add RPC are the biggest operation so we need to find the run with the least amount of Adds.
5656
// We will reset the run we use each time a runScore is less than the current score.
5757
int numberOfAdds = 0;
5858
for (int status = 0; status < newMenuStatus.size(); status++) {
@@ -77,8 +77,8 @@ private static DynamicMenuUpdateRunScore startCompareAtRun(int startRun, List<Me
7777
}
7878

7979
/**
80-
* Builds a 1-1 array of Deletes for every element in the array
81-
* @param oldMenu The old menu array
80+
* Builds a 1-1 list of Deletes for every element in the array
81+
* @param oldMenu The old menu list
8282
*/
8383
static List<MenuCellState> buildAllDeleteStatusesForMenu (List<MenuCell> oldMenu){
8484
List<MenuCellState> oldMenuStatus = new ArrayList<>(oldMenu.size());
@@ -89,8 +89,8 @@ static List<MenuCellState> buildAllDeleteStatusesForMenu (List<MenuCell> oldMenu
8989
}
9090

9191
/**
92-
* Builds a 1-1 array of Adds for every element in the array
93-
* @param newMenu The new menu array
92+
* Builds a 1-1 list of Adds for every element in the list
93+
* @param newMenu The new menu list
9494
*/
9595
static List<MenuCellState> buildAllAddStatusesForMenu (List<MenuCell> newMenu){
9696
List<MenuCellState> newMenuStatus = new ArrayList<>(newMenu.size());

0 commit comments

Comments
 (0)