Class GroupUtil

java.lang.Object
ntnu.idatt2016.v233.SmartMat.util.GroupUtil

public class GroupUtil extends Object
This class provide some useful methods used with the group entity.
Version:
1.0
Author:
Pedro Cardona
  • Constructor Details

    • GroupUtil

      public GroupUtil()
  • Method Details

    • getLevel

      public static int getLevel(long exp)
      Calculates the level of a group based on its experience points.
      Parameters:
      exp - The experience points of the group.
      Returns:
      The level of the group.
    • getProgressOfLevel

      public static int getProgressOfLevel(long exp)
      Calculates the progress of the current level of a group based on its experience points.
      Parameters:
      exp - The experience points of the group.
      Returns:
      The progress of the current level of the group as a percentage.
    • generateUniqueCode

      public static String generateUniqueCode()
      Generates a unique six-digit code using UUID.
      Returns:
      A unique six-digit code.