org.apache.commons.httpclient
Class UsernamePasswordCredentials

java.lang.Object
  extended by org.apache.commons.httpclient.UsernamePasswordCredentials
All Implemented Interfaces:
Credentials
Direct Known Subclasses:
NTCredentials

public class UsernamePasswordCredentials
extends Object
implements Credentials

Username and password Credentials.

Version:
$Revision: 326707 $ $Date: 2005-10-19 22:51:46 +0200 (Mi, 19 Okt 2005) $
Author:
Remy Maucherat, Sean C. Sullivan, Mike Bowler, Oleg Kalnichevski

Constructor Summary
UsernamePasswordCredentials(String usernamePassword)
          The constructor with the username and password combined string argument.
UsernamePasswordCredentials(String userName, String password)
          The constructor with the username and password arguments.
 
Method Summary
 boolean equals(Object o)
          These credentials are assumed equal if the username and password are the same.
 String getPassword()
          Password property getter.
 String getUserName()
          User name property getter.
 int hashCode()
          Does a hash of both user name and password.
 String toString()
          Get this object string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UsernamePasswordCredentials

public UsernamePasswordCredentials(String usernamePassword)
The constructor with the username and password combined string argument.

Parameters:
usernamePassword - the username:password formed string
See Also:
toString()

UsernamePasswordCredentials

public UsernamePasswordCredentials(String userName,
                                   String password)
The constructor with the username and password arguments.

Parameters:
userName - the user name
password - the password
Method Detail

getUserName

public String getUserName()
User name property getter.

Returns:
the userName

getPassword

public String getPassword()
Password property getter.

Returns:
the password

toString

public String toString()
Get this object string.

Overrides:
toString in class Object
Returns:
the username:password formed string

hashCode

public int hashCode()
Does a hash of both user name and password.

Overrides:
hashCode in class Object
Returns:
The hash code including user name and password.

equals

public boolean equals(Object o)
These credentials are assumed equal if the username and password are the same.

Overrides:
equals in class Object
Parameters:
o - The other object to compare with.
Returns:
true if the object is equivalent.


Copyright (c) 1999-2005 - Apache Software Foundation