|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.util.TFSUser
public final class TFSUser
Identifies a user by a username and Windows domain name, and provides methods for parsing these from and printing these to strings.
Constructor Summary | |
---|---|
TFSUser(java.lang.String usernameAndOptionalDomain)
Constructs a TFSUser from the given username (and optionally, domain) string. |
|
TFSUser(java.lang.String username,
java.lang.String domain)
Constructs a TFSUser from the given username (and optionally, domain) string. |
|
TFSUser(TFSUser user)
Constructs a TFSUser from the given TFSUser class. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDomain()
|
java.lang.String |
getUsername()
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TFSUser(java.lang.String usernameAndOptionalDomain) throws TFSUsernameParseException
Constructs a TFSUser from the given username (and optionally, domain) string. These styles are supported:
If a separator is found at the beginning or end of the input, the
username or domain will be considered empty, respectively. If the
username is empty, the construction throws
TFSUsernameParseException
.
usernameAndOptionalDomain
- the username and optional domain string (must not be
null
)
TFSUsernameParseException
- when the string could not be parsed.public TFSUser(java.lang.String username, java.lang.String domain) throws TFSUsernameParseException
username
- the username string to assign (must not be null
)domain
- the domain string to assign (may be null).
TFSUsernameParseException
- when the inputs were not invalidpublic TFSUser(TFSUser user)
user
- the instance to initialize the new instance's values from.Method Detail |
---|
public java.lang.String getUsername()
public java.lang.String getDomain()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |