Record Class DatabaseManager.StructureInsertResult
java.lang.Object
java.lang.Record
nl.pim16aap2.animatedarchitecture.core.managers.DatabaseManager.StructureInsertResult
- Record Components:
structure- The structure as it was inserted into the database. This will be empty when inserted failed.cancelled- Whether the insertion was cancelled. An insertion may be cancelled if some listener cancels theIStructurePrepareCreateEventevent.
- Enclosing class:
DatabaseManager
public static record DatabaseManager.StructureInsertResult(Optional<Structure> structure, boolean cancelled)
extends Record
Contains the result of an attempt to insert a structure into the database.
-
Constructor Summary
ConstructorsConstructorDescriptionStructureInsertResult(Optional<Structure> structure, boolean cancelled) Creates an instance of aStructureInsertResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecancelledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thestructurerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
structure
Returns the value of thestructurerecord component.- Returns:
- the value of the
structurerecord component
-
cancelled
public boolean cancelled()Returns the value of thecancelledrecord component.- Returns:
- the value of the
cancelledrecord component
-