@Test public void testHasCode() { NuxeoPrincipalImpl a = new NuxeoPrincipalImpl("foo"); NuxeoPrincipalImpl b = new NuxeoPrincipalImpl("foo"); assertEquals(a.hashCode(), b.hashCode()); }
@Override public int hashCode() { String name = getName(); return name == null ? 0 : name.hashCode(); }
NuxeoPrincipalImpl implements NuxeoPrincipal { @Override public int hashCode() { String name = getName(); return name == null ? 0 : name.hashCode(); } }
NuxeoPrincipalImpl implements NuxeoPrincipal { @Override public int hashCode() { String name = getName(); return name == null ? 0 : name.hashCode(); } NuxeoPrincipalImpl(String name);  NuxeoPrincipalImpl(String name, boolean isAnonymous);  NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator);  NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator, boolean updateAllGroups); protected  NuxeoPrincipalImpl(NuxeoPrincipalImpl other); }
NuxeoPrincipalImpl implements NuxeoPrincipal { @Override public int hashCode() { String name = getName(); return name == null ? 0 : name.hashCode(); } NuxeoPrincipalImpl(String name);  NuxeoPrincipalImpl(String name, boolean isAnonymous);  NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator);  NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator, boolean updateAllGroups); protected  NuxeoPrincipalImpl(NuxeoPrincipalImpl other); void setConfig(UserConfig config); UserConfig getConfig(); @Override String getCompany(); @Override void setCompany(String company); @Override String getFirstName(); @Override void setFirstName(String firstName); @Override String getLastName(); @Override void setLastName(String lastName); @Override void setName(String name); @Override void setRoles(List<String> roles); @Override void setGroups(List<String> groups); @Override String getName(); @SuppressWarnings("unchecked") @Override List<String> getGroups(); @Deprecated @Override List<String> getRoles(); @Override void setPassword(String password); @Override String getPassword(); @Override String toString(); @Override String getPrincipalId(); @Override void setPrincipalId(String principalId); @Override String getEmail(); @Override void setEmail(String email); @Override DocumentModel getModel(); void setModel(DocumentModel model, boolean updateAllGroups); @Override void setModel(DocumentModel model); @Override boolean isMemberOf(String group); @Override List<String> getAllGroups(); void updateAllGroups(); List<String> getVirtualGroups(); void setVirtualGroups(List<String> virtualGroups, boolean updateAllGroups); void setVirtualGroups(List<String> virtualGroups); @Override boolean isAdministrator(); @Override String getTenantId(); @Override boolean isAnonymous(); @Override boolean equals(Object other); @Override int hashCode(); @Override String getOriginatingUser(); @Override void setOriginatingUser(String originatingUser); @Override String getActingUser(); @Override boolean isTransient(); }
NuxeoPrincipalImpl implements NuxeoPrincipal { @Override public int hashCode() { String name = getName(); return name == null ? 0 : name.hashCode(); } NuxeoPrincipalImpl(String name);  NuxeoPrincipalImpl(String name, boolean isAnonymous);  NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator);  NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator, boolean updateAllGroups); protected  NuxeoPrincipalImpl(NuxeoPrincipalImpl other); void setConfig(UserConfig config); UserConfig getConfig(); @Override String getCompany(); @Override void setCompany(String company); @Override String getFirstName(); @Override void setFirstName(String firstName); @Override String getLastName(); @Override void setLastName(String lastName); @Override void setName(String name); @Override void setRoles(List<String> roles); @Override void setGroups(List<String> groups); @Override String getName(); @SuppressWarnings("unchecked") @Override List<String> getGroups(); @Deprecated @Override List<String> getRoles(); @Override void setPassword(String password); @Override String getPassword(); @Override String toString(); @Override String getPrincipalId(); @Override void setPrincipalId(String principalId); @Override String getEmail(); @Override void setEmail(String email); @Override DocumentModel getModel(); void setModel(DocumentModel model, boolean updateAllGroups); @Override void setModel(DocumentModel model); @Override boolean isMemberOf(String group); @Override List<String> getAllGroups(); void updateAllGroups(); List<String> getVirtualGroups(); void setVirtualGroups(List<String> virtualGroups, boolean updateAllGroups); void setVirtualGroups(List<String> virtualGroups); @Override boolean isAdministrator(); @Override String getTenantId(); @Override boolean isAnonymous(); @Override boolean equals(Object other); @Override int hashCode(); @Override String getOriginatingUser(); @Override void setOriginatingUser(String originatingUser); @Override String getActingUser(); @Override boolean isTransient(); final List<String> roles; public List<String> virtualGroups; public List<String> allGroups; final boolean isAnonymous; public boolean isAdministrator; public String principalId; public DocumentModel model; public DataModel dataModel; public String origUserName; }