@Test public void latestRevisionNumber_of_state_and_empty_list() { GlobalGroupState emptyState = new GlobalGroupState(state(10), emptyList()); assertEquals(10, emptyState.getLatestRevisionNumber()); }
int getLatestRevisionNumber() { if (serverHistory.isEmpty()) { if (localState == null) { throw new AssertionError(); } return localState.getRevision(); } return serverHistory.get(serverHistory.size() - 1).getRevision(); }
GlobalGroupState { int getLatestRevisionNumber() { if (serverHistory.isEmpty()) { if (localState == null) { throw new AssertionError(); } return localState.getRevision(); } return serverHistory.get(serverHistory.size() - 1).getRevision(); } }
GlobalGroupState { int getLatestRevisionNumber() { if (serverHistory.isEmpty()) { if (localState == null) { throw new AssertionError(); } return localState.getRevision(); } return serverHistory.get(serverHistory.size() - 1).getRevision(); } GlobalGroupState(@Nullable DecryptedGroup localState,
                   @NonNull List<ServerGroupLogEntry> serverHistory); }
GlobalGroupState { int getLatestRevisionNumber() { if (serverHistory.isEmpty()) { if (localState == null) { throw new AssertionError(); } return localState.getRevision(); } return serverHistory.get(serverHistory.size() - 1).getRevision(); } GlobalGroupState(@Nullable DecryptedGroup localState,
                   @NonNull List<ServerGroupLogEntry> serverHistory);  }
GlobalGroupState { int getLatestRevisionNumber() { if (serverHistory.isEmpty()) { if (localState == null) { throw new AssertionError(); } return localState.getRevision(); } return serverHistory.get(serverHistory.size() - 1).getRevision(); } GlobalGroupState(@Nullable DecryptedGroup localState,
                   @NonNull List<ServerGroupLogEntry> serverHistory);   }