java.lang.Object
io.github.tonywasher.joceanus.oceanus.resource.OceanusResourceLoader

public final class OceanusResourceLoader extends Object
Resource Loader.
  • Method Details

    • getErrorNoResource

      public static String getErrorNoResource(Enum<?> pId)
      Error for missing resource.
      Parameters:
      pId - the missing id
      Returns:
      the error message
    • getIconForEnum

      public static <E extends Enum<E>, I> I getIconForEnum(Map<E,I> pMap, E pValue)
      Obtain Icon for enum.
      Type Parameters:
      E - the enum type
      I - the icon type
      Parameters:
      pMap - the map
      pValue - the enum value
      Returns:
      the icon
    • loadResourceToString

      public static String loadResourceToString(OceanusResourceId pKey) throws OceanusException
      Load resource file to String.
      Parameters:
      pKey - the resource Key
      Returns:
      the loaded resource
      Throws:
      OceanusException - on error