Class Admin

java.lang.Object
example.app.entities.users.Admin

public final class Admin extends Object

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 Details

  • Constructor Details

    • Admin

      public Admin()
  • Method Details

    • usernameEquals

      public static boolean usernameEquals(String username)
      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

      public static boolean passwordEquals(String password)
      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

      public static boolean credentialsEquals(String username, String password)
      This method checks if a username and password are equal to the admins or not.
      Parameters:
      username - The username to be checked
      password - The password to be checked
      Returns:
      True if the username and password are equal to the admins or false if not