Record Class AcceptConflictResource.ConflictData
java.lang.Object
java.lang.Record
ch.tocco.nice2.optional.reservation.impl.actions.AcceptConflictResource.ConflictData
- All Implemented Interfaces:
Comparable<AcceptConflictResource.ConflictData>
- Enclosing class:
AcceptConflictResource
public static record AcceptConflictResource.ConflictData(String id, String conflictItem, String conflictItemModel, boolean accepted, AcceptConflictResource.ConflictItem firstItem, AcceptConflictResource.ConflictItem secondItem)
extends Record
implements Comparable<AcceptConflictResource.ConflictData>
-
Constructor Summary
ConstructorsConstructorDescriptionConflictData(String id, String conflictItem, String conflictItemModel, boolean accepted, AcceptConflictResource.ConflictItem firstItem, AcceptConflictResource.ConflictItem secondItem) Creates an instance of aConflictDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepted()Returns the value of theacceptedrecord component.intReturns the value of theconflictItemrecord component.Returns the value of theconflictItemModelrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstItemrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thesecondItemrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConflictData
public ConflictData(String id, String conflictItem, String conflictItemModel, boolean accepted, AcceptConflictResource.ConflictItem firstItem, AcceptConflictResource.ConflictItem secondItem) Creates an instance of aConflictDatarecord class.- Parameters:
id- the value for theidrecord componentconflictItem- the value for theconflictItemrecord componentconflictItemModel- the value for theconflictItemModelrecord componentaccepted- the value for theacceptedrecord componentfirstItem- the value for thefirstItemrecord componentsecondItem- the value for thesecondItemrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<AcceptConflictResource.ConflictData>
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
conflictItem
Returns the value of theconflictItemrecord component.- Returns:
- the value of the
conflictItemrecord component
-
conflictItemModel
Returns the value of theconflictItemModelrecord component.- Returns:
- the value of the
conflictItemModelrecord component
-
accepted
public boolean accepted()Returns the value of theacceptedrecord component.- Returns:
- the value of the
acceptedrecord component
-
firstItem
Returns the value of thefirstItemrecord component.- Returns:
- the value of the
firstItemrecord component
-
secondItem
Returns the value of thesecondItemrecord component.- Returns:
- the value of the
secondItemrecord component
-