Record Class UrlLoadableResource
java.lang.Object
java.lang.Record
dev.pfaff.altargui.resource.UrlLoadableResource
- All Implemented Interfaces:
LoadableResource
public record UrlLoadableResource(UrlResourceLoader loader, String url)
extends Record
implements LoadableResource
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.pfaff.altargui.resource.LoadableResource
LoadableResource.ByBytes, LoadableResource.ByInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionUrlLoadableResource
(UrlResourceLoader loader, String url) Creates an instance of aUrlLoadableResource
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.loader()
Returns the value of theloader
record component.@NonNull InputStream
@NonNull MemorySegment
final String
toString()
Returns a string representation of this record class.url()
Returns the value of theurl
record component.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
-
Constructor Details
-
UrlLoadableResource
Creates an instance of aUrlLoadableResource
record class.- Parameters:
loader
- the value for theloader
record componenturl
- the value for theurl
record component
-
-
Method Details
-
readBytes
- Specified by:
readBytes
in interfaceLoadableResource
- Throws:
IOException
-
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)
. -
loader
Returns the value of theloader
record component.- Returns:
- the value of the
loader
record component
-
url
Returns the value of theurl
record component.- Returns:
- the value of the
url
record component
-