public class ImmutableUser extends Object implements User, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ImmutableUser.Builder
Used to aid in the construction of an Immutable User object.
|
Constructor and Description |
---|
ImmutableUser(long directoryId,
String name,
String displayName,
String emailAddress,
boolean active) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(User other)
CompareTo must be compatible with the equals() and hashCode() methods
|
boolean |
equals(Object o)
Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
|
static ImmutableUser |
from(User user) |
long |
getDirectoryId() |
String |
getDisplayName() |
String |
getEmailAddress() |
String |
getName() |
int |
hashCode()
Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
|
boolean |
isActive() |
static ImmutableUser.Builder |
newUser() |
static ImmutableUser.Builder |
newUser(User user)
Creates a new User Builder by cloning the values from the supplied User.
|
public static ImmutableUser from(User user)
ImmutableUser
with the same properties as the given user.
Will avoid creating a copy if possible.public boolean isActive()
public long getDirectoryId()
getDirectoryId
in interface User
public String getEmailAddress()
getEmailAddress
in interface User
public String getDisplayName()
getDisplayName
in interface User
public boolean equals(Object o)
User
public int hashCode()
User
public int compareTo(User other)
User
compareTo
in interface User
compareTo
in interface Comparable<User>
public static ImmutableUser.Builder newUser()
public static ImmutableUser.Builder newUser(User user)
user
- user to be cloned.Copyright © 2021 Atlassian. All rights reserved.