com.atlassian.sal.api.user
Class UserKey

java.lang.Object
  extended by com.atlassian.sal.api.user.UserKey
All Implemented Interfaces:
Serializable

public final class UserKey
extends Object
implements Serializable

Represents an identifier that uniquely identifies a user for the duration of its existence.

Since:
v2.10
See Also:
Serialized Form

Constructor Summary
UserKey(String userkey)
          Default constructor: builds a UserKey from its string representation.
 
Method Summary
 boolean equals(Object o)
           
static UserKey fromLong(long userId)
          Builds a UserKey object from a long id.
 String getStringValue()
          Returns a string representation of the current key.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserKey

public UserKey(@Nonnull
               String userkey)
Default constructor: builds a UserKey from its string representation.

Parameters:
userkey - the string representation of a UserKey. Must not be null.
Method Detail

getStringValue

@Nonnull
public String getStringValue()
Returns a string representation of the current key.

Returns:
a string representation of the current key

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

fromLong

public static UserKey fromLong(long userId)
Builds a UserKey object from a long id. The id will be converted to a String first.

Parameters:
userId - a user ID
Returns:
a UserKey object


Copyright © 2014 Atlassian. All Rights Reserved.