java.lang.Object
com.example.slacks_lottoevent.model.User

public class User extends Object
Singleton class representing a User. This class provides a unique user identifier based on the device's ID.
  • Method Details

    • initialize

      public static void initialize(android.content.Context context)
      Initializes the singleton User instance with the provided context.
      Parameters:
      context - the application context used to initialize the User instance
      Throws:
      IllegalStateException - if the method is called after the instance is already initialized
    • getInstance

      public static User getInstance()
      Returns the singleton User instance.
      Returns:
      the singleton User instance
      Throws:
      IllegalStateException - if the User instance has not been initialized
    • getDeviceId

      public String getDeviceId()
      Returns the device ID associated with the User.
      Returns:
      the device ID as a String