com.atlassian.jira.usercompatibility
Class DelegatingUserWithKey
java.lang.Object
com.atlassian.jira.usercompatibility.DelegatingUserWithKey
- All Implemented Interfaces:
- UserWithKey
public class DelegatingUserWithKey
- extends java.lang.Object
- implements UserWithKey
|
Constructor Summary |
DelegatingUserWithKey(com.atlassian.crowd.embedded.api.User user,
java.lang.String key)
|
|
Method Summary |
boolean |
equals(java.lang.Object obj)
Implementations must ensure equality based on getKey(). |
java.lang.String |
getKey()
|
com.atlassian.crowd.embedded.api.User |
getUser()
|
int |
hashCode()
Implementations must produce a hashcode based on getKey(). |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
DelegatingUserWithKey
public DelegatingUserWithKey(com.atlassian.crowd.embedded.api.User user,
java.lang.String key)
getUser
public com.atlassian.crowd.embedded.api.User getUser()
- Specified by:
getUser in interface UserWithKey
- Returns:
- the user identified by key
getKey
public java.lang.String getKey()
- Specified by:
getKey in interface UserWithKey
- Returns:
- the key which distinguishes the ApplicationUser as unique
equals
public boolean equals(java.lang.Object obj)
- Description copied from interface:
UserWithKey
- Implementations must ensure equality based on getKey().
- Specified by:
equals in interface UserWithKey- Overrides:
equals in class java.lang.Object
- Parameters:
obj - object to compare to.
- Returns:
true if and only if the key matches.
hashCode
public int hashCode()
- Description copied from interface:
UserWithKey
- Implementations must produce a hashcode based on getKey().
- Specified by:
hashCode in interface UserWithKey- Overrides:
hashCode in class java.lang.Object
- Returns:
- hashcode.
Copyright © 2013 Atlassian. All Rights Reserved.