Class ExternalResourceLocation

java.lang.Object
net.luis.utils.resources.ResourceLocation
net.luis.utils.resources.ExternalResourceLocation

final class ExternalResourceLocation extends ResourceLocation
External implementation of ResourceLocation.
This class is used to load resources from the filesystem.
  • Field Details

    • file

      private final File file
      The resource as a file.
    • path

      private final Path path
      The resource as a path.
  • Constructor Details

    • ExternalResourceLocation

      ExternalResourceLocation(@NotNull @NotNull Pair<String,String> pair)
      Constructs a new external resource location from the given Pair.
      The first value of the pair is the path, and the second value is the name of the resource.
      Parameters:
      pair - The pair
      Throws:
      NullPointerException - If the pair is null
    • ExternalResourceLocation

      ExternalResourceLocation(@Nullable @Nullable String path, @NotNull @NotNull String name)
      Constructs a new external resource location with the given path and name.
      Parameters:
      path - The path of the resource
      name - The name of the resource
      Throws:
      NullPointerException - If the name is null
  • Method Details