Interface IManager<R>

Type Parameters:
R - the Entity typ.
All Known Implementing Classes:
GiveawayManager

public interface IManager<R>
Interface for a simple Manager for a specific Entity.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    add(R object)
    Add an object to the List.
    default void
    Clear the List.
    default R
    get(long value)
    Get an object from the List.
    default R
    get(String value)
    Get an object from the List.
    Get the List.
    void
    Load the needed data.
    default void
    remove(R object)
    Remove an object from the List.
    default void
    replace(List<R> newList)
    Replace the List with a new one.
  • Method Details

    • load

      void load()
      Load the needed data.
    • add

      default void add(R object)
      Add an object to the List.
      Parameters:
      object - the object to add.
    • remove

      default void remove(R object)
      Remove an object from the List.
      Parameters:
      object - the object to remove.
    • clear

      default void clear()
      Clear the List.
    • replace

      default void replace(List<R> newList)
      Replace the List with a new one.
      Parameters:
      newList - the new List.
    • get

      default R get(String value)
      Get an object from the List.
      Parameters:
      value - the value to search for.
      Returns:
      the object.
      Throws:
      UnsupportedOperationException - if the method is not implemented.
    • get

      default R get(long value)
      Get an object from the List.
      Parameters:
      value - the value to search for.
      Returns:
      the object.
      Throws:
      UnsupportedOperationException - if the method is not implemented.
    • getList

      List<R> getList()
      Get the List.
      Returns:
      the List.