Class ExperienceCache.LevelNotCalculatedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
de.Keyle.MyPet.api.skill.experience.ExperienceCache.LevelNotCalculatedException
All Implemented Interfaces:
Serializable
Enclosing class:
ExperienceCache

public static class ExperienceCache.LevelNotCalculatedException extends Exception
Thrown when a requested level has not yet been computed and cached.

Callers should catch this and compute the value on demand via the active ExperienceCalculator, then insert the result into the cache.

See Also:
  • Constructor Details

    • LevelNotCalculatedException

      public LevelNotCalculatedException(PetType type, int level)
      Reports that the cache holds no value for a pet type at a given level.
      Parameters:
      type - the pet type asked about
      level - the level asked about
  • Method Details

    • getType

      public PetType getType()
      The pet type whose level could not be computed.
      Returns:
      the pet type
    • getLevel

      public int getLevel()
      The level that could not be computed.
      Returns:
      the level