Package com.zaxxer.hikari.util
Class Credentials
- java.lang.Object
-
- com.zaxxer.hikari.util.Credentials
-
public final class Credentials extends Object
A simple class to hold connection credentials and is designed to be immutable.
-
-
Constructor Summary
Constructors Constructor Description Credentials(String username, String password)Construct an immutable Credentials object with the supplied username and password.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPassword()Get the password.StringgetUsername()Get the username.static Credentialsof(String username, String password)Construct an immutable Credentials object with the supplied username and password.
-
-
-
Constructor Detail
-
Credentials
@ConstructorParameters({"username","password"}) public Credentials(String username, String password)
Construct an immutable Credentials object with the supplied username and password.- Parameters:
username- the usernamepassword- the password
-
-
Method Detail
-
of
public static Credentials of(String username, String password)
Construct an immutable Credentials object with the supplied username and password.- Parameters:
username- the usernamepassword- the password- Returns:
- a new Credentials object
-
getUsername
public String getUsername()
Get the username.- Returns:
- the username
-
getPassword
public String getPassword()
Get the password.- Returns:
- the password
-
-