Class StyleSheetPool

All Implemented Interfaces:
MultiAssetLoader<StyleSheet>, Destructible

public final class StyleSheetPool extends TextAssetPool<StyleSheet> implements MultiAssetLoader<StyleSheet>
  • Constructor Details

    • StyleSheetPool

      public StyleSheetPool()
  • Method Details

    • load

      public StyleSheet load(String path)
      Description copied from class: AssetPool
      Loads an asset from a path or retrieves it from the pool if it has already been loaded once.

      This method is protected because some subclasses may require additional parameters to load an asset.

      Specified by:
      load in interface MultiAssetLoader<StyleSheet>
      Overrides:
      load in class AssetPool<StyleSheet>
      Parameters:
      path - The path of the asset
      Returns:
      The asset, or null if it failed to load.
    • parse

      protected StyleSheet parse(String path, String content)
      Description copied from class: TextAssetPool
      Parses the text file as an asset.
      Specified by:
      parse in class TextAssetPool<StyleSheet>
      Parameters:
      path - The path of the text file. Mostly used for debugging purposes.
      content - The content of the text file
      Returns:
      The new asset