Package example.app.entities.users
Class Admin
java.lang.Object
example.app.entities.users.Admin
Class Admin
This is a final class that represents a Admin. All the values are hard coded as there can be only one admin in this app. Admin class does not extend the User class.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancredentialsEquals(String username, String password) This method checks if a username and password are equal to the admins or not.static booleanpasswordEquals(String password) This method checks if a password is equal to the admins or not.static booleanusernameEquals(String username) This method checks if a username is equal to the admins or not.
-
Field Details
-
FIRST_NAME
- See Also:
-
LAST_NAME
- See Also:
-
EMAIL
- See Also:
-
-
Constructor Details
-
Admin
public Admin()
-
-
Method Details
-
usernameEquals
This method checks if a username is equal to the admins or not.- Parameters:
username- The username to be checked- Returns:
- True if the username is equal to the admins or false if not
-
passwordEquals
This method checks if a password is equal to the admins or not.- Parameters:
password- The password to be checked- Returns:
- True if the password is equal to the admins or false if not
-
credentialsEquals
This method checks if a username and password are equal to the admins or not.- Parameters:
username- The username to be checkedpassword- The password to be checked- Returns:
- True if the username and password are equal to the admins or false if not
-