public final class ImmutableUser extends Object implements User
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableUser.Builder |
| Constructor and Description |
|---|
ImmutableUser(long directoryId,
String name,
String displayName,
String emailAddress,
boolean active,
String firstName,
String lastName,
String externalId) |
ImmutableUser(User user) |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableUser.Builder |
builder(long directoryId,
String name) |
static ImmutableUser.Builder |
builder(String name) |
static ImmutableUser.Builder |
builder(User user) |
int |
compareTo(User user)
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 |
getExternalId() |
String |
getFirstName() |
String |
getLastName() |
String |
getName() |
int |
hashCode()
Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
|
boolean |
isActive() |
String |
toString() |
public ImmutableUser(User user)
public static ImmutableUser from(User user)
ImmutableUser with the same properties as the given user.
Will avoid creating a copy if possible.public static ImmutableUser.Builder builder(long directoryId, String name)
public static ImmutableUser.Builder builder(String name)
public static ImmutableUser.Builder builder(User user)
public boolean isActive()
public long getDirectoryId()
getDirectoryId in interface UsergetDirectoryId in interface DirectoryEntitypublic String getName()
getName in interface DirectoryEntitygetName in interface Principalpublic String getEmailAddress()
getEmailAddress in interface Userpublic String getDisplayName()
getDisplayName in interface Userpublic String getFirstName()
public String getLastName()
public String getExternalId()
public boolean equals(Object o)
DirectoryEntityequals in interface Userequals in interface DirectoryEntityequals in interface Principalequals in class Objecto - object to compare to.true if and only if the directoryId
and the lowercase names of the directory entities match.public int hashCode()
DirectoryEntitypublic int compareTo(User user)
UsercompareTo in interface UsercompareTo in interface Comparable<User>Copyright © 2019 Atlassian. All rights reserved.