org.apache.commons.dbcp.datasources
class: UserPassKey [javadoc |
source]
java.lang.Object
org.apache.commons.dbcp.datasources.UserPassKey
All Implemented Interfaces:
Serializable
Holds a username, password pair.
- version:
$ - Revision: 479137 $ $Date: 2006-11-25 08:51:48 -0700 (Sat, 25 Nov 2006) $
| Method from org.apache.commons.dbcp.datasources.UserPassKey Detail: |
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (!(obj instanceof UserPassKey)) {
return false;
}
UserPassKey key = (UserPassKey) obj;
boolean usersEqual =
(this.username == null
? key.username == null
: this.username.equals(key.username));
boolean passwordsEqual =
(this.password == null
? key.password == null
: this.password.equals(key.password));
return (usersEqual && passwordsEqual);
}
|
public String getPassword() {
return password;
}
Get the value of password. |
public String getUsername() {
return username;
}
Get the value of username. |
public int hashCode() {
return (this.username != null ? this.username.hashCode() : 0);
}
|
public String toString() {
StringBuffer sb = new StringBuffer(50);
sb.append("UserPassKey(");
sb.append(username).append(", ").append(password).append(')");
return sb.toString();
}
|