Record Class GraphicsScope
java.lang.Object
java.lang.Record
com.xpdustry.nohorny.common.GraphicsScope
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionGraphicsScope(Graphics2D graphics) Creates an instance of aGraphicsScoperecord class.GraphicsScope(BufferedImage image) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final booleanIndicates whether some other object is "equal to" this one.graphics()Returns the value of thegraphicsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GraphicsScope
-
GraphicsScope
Creates an instance of aGraphicsScoperecord class.- Parameters:
graphics- the value for thegraphicsrecord component
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
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). -
graphics
Returns the value of thegraphicsrecord component.- Returns:
- the value of the
graphicsrecord component
-