Record Class ModuleResourceLoadableResource
java.lang.Object
java.lang.Record
dev.pfaff.altargui.resource.ModuleResourceLoadableResource
- Record Components:
module
- the module owning the resourceresource
- the path to the resource within the module
- All Implemented Interfaces:
LoadableResource
,LoadableResource.ByInputStream
public record ModuleResourceLoadableResource(Module module, String resource)
extends Record
implements LoadableResource.ByInputStream
When running with modules, the
module
must open the resource to this class's module.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.pfaff.altargui.resource.LoadableResource
LoadableResource.ByBytes, LoadableResource.ByInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionModuleResourceLoadableResource
(Module module, String resource) Creates an instance of aModuleResourceLoadableResource
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.module()
Returns the value of themodule
record component.@NonNull InputStream
resource()
Returns the value of theresource
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.pfaff.altargui.resource.LoadableResource
readString
Methods inherited from interface dev.pfaff.altargui.resource.LoadableResource.ByInputStream
readBytes
-
Constructor Details
-
ModuleResourceLoadableResource
-
-
Method Details
-
openInputStream
- Specified by:
openInputStream
in interfaceLoadableResource
- Throws:
IOException
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
module
-
resource
-