@Test public void testIsCurrent() { CachedCurrentUserController controller = new CachedCurrentUserController(null); ParseUser currentUser = new ParseUser(); controller.currentUser = currentUser; assertTrue(controller.isCurrent(currentUser)); assertFalse(controller.isCurrent(new ParseUser())); }
@Override public boolean isCurrent(ParseUser user) { synchronized (mutex) { return currentUser == user; } }
CachedCurrentUserController implements ParseCurrentUserController { @Override public boolean isCurrent(ParseUser user) { synchronized (mutex) { return currentUser == user; } } }
CachedCurrentUserController implements ParseCurrentUserController { @Override public boolean isCurrent(ParseUser user) { synchronized (mutex) { return currentUser == user; } } CachedCurrentUserController(ParseObjectStore<ParseUser> store); }
CachedCurrentUserController implements ParseCurrentUserController { @Override public boolean isCurrent(ParseUser user) { synchronized (mutex) { return currentUser == user; } } CachedCurrentUserController(ParseObjectStore<ParseUser> store); @Override Task<Void> setAsync(final ParseUser user); @Override Task<Void> setIfNeededAsync(ParseUser user); @Override Task<ParseUser> getAsync(); @Override Task<Boolean> existsAsync(); @Override boolean isCurrent(ParseUser user); @Override void clearFromMemory(); @Override void clearFromDisk(); @Override Task<String> getCurrentSessionTokenAsync(); @Override Task<Void> logOutAsync(); @Override Task<ParseUser> getAsync(final boolean shouldAutoCreateUser); }
CachedCurrentUserController implements ParseCurrentUserController { @Override public boolean isCurrent(ParseUser user) { synchronized (mutex) { return currentUser == user; } } CachedCurrentUserController(ParseObjectStore<ParseUser> store); @Override Task<Void> setAsync(final ParseUser user); @Override Task<Void> setIfNeededAsync(ParseUser user); @Override Task<ParseUser> getAsync(); @Override Task<Boolean> existsAsync(); @Override boolean isCurrent(ParseUser user); @Override void clearFromMemory(); @Override void clearFromDisk(); @Override Task<String> getCurrentSessionTokenAsync(); @Override Task<Void> logOutAsync(); @Override Task<ParseUser> getAsync(final boolean shouldAutoCreateUser);  }