Record Class PathLoadableResource
java.lang.Object
java.lang.Record
dev.pfaff.altargui.resource.PathLoadableResource
- All Implemented Interfaces:
LoadableResource
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.pfaff.altargui.resource.LoadableResource
LoadableResource.ByBytes, LoadableResource.ByInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionPathLoadableResource
(Path path) Creates an instance of aPathLoadableResource
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.@NonNull InputStream
path()
Returns the value of thepath
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
-
Constructor Details
-
PathLoadableResource
Creates an instance of aPathLoadableResource
record class.- Parameters:
path
- the value for thepath
record component
-
-
Method Details
-
readBytes
- Specified by:
readBytes
in interfaceLoadableResource
-
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)
. -
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-