com.atlassian.crowd.model.user
Class DelegatingUserWithAttributes
java.lang.Object
com.atlassian.crowd.embedded.impl.AbstractDelegatingEntityWithAttributes
com.atlassian.crowd.embedded.impl.DelegatingUserWithAttributes
com.atlassian.crowd.model.user.DelegatingUserWithAttributes
- All Implemented Interfaces:
- Attributes, User, UserWithAttributes, DirectoryEntity, java.lang.Comparable<User>, java.security.Principal
public class DelegatingUserWithAttributes
- extends DelegatingUserWithAttributes
- implements UserWithAttributes
Implementation of UserWithAttributes that simply delegates to an underlying User and Attributes object.
Instances of this class will be effectively immutable so long as either:
- It is constructed with immutable objects.
or,
- The mutable objects it is constructed with are not "leaked".
Method Summary |
int |
compareTo(User other)
CompareTo must be compatible with the equals() and hashCode() methods |
boolean |
equals(java.lang.Object o)
Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName(). |
java.lang.String |
getFirstName()
|
java.lang.String |
getLastName()
|
int |
hashCode()
Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName(). |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
DelegatingUserWithAttributes
public DelegatingUserWithAttributes(User user,
Attributes attributes)
getFirstName
public java.lang.String getFirstName()
getLastName
public java.lang.String getLastName()
equals
public boolean equals(java.lang.Object o)
- Description copied from interface:
User
- Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
- Specified by:
equals
in interface User
- Specified by:
equals
in interface DirectoryEntity
- Specified by:
equals
in interface java.security.Principal
- Overrides:
equals
in class DelegatingUserWithAttributes
- Parameters:
o
- object to compare to.
- Returns:
true
if and only if the directoryId
and name.toLowerCase() of the directory entities match.
hashCode
public int hashCode()
- Description copied from interface:
User
- Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
- Specified by:
hashCode
in interface User
- Specified by:
hashCode
in interface DirectoryEntity
- Specified by:
hashCode
in interface java.security.Principal
- Overrides:
hashCode
in class DelegatingUserWithAttributes
- Returns:
- hashcode.
compareTo
public int compareTo(User other)
- Description copied from interface:
User
- CompareTo must be compatible with the equals() and hashCode() methods
- Specified by:
compareTo
in interface User
- Specified by:
compareTo
in interface java.lang.Comparable<User>
- Overrides:
compareTo
in class DelegatingUserWithAttributes
Copyright © 2010 Atlassian. All Rights Reserved.