Record Class ListElementsChangeEvent<Entity_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.variable.ListElementsChangeEvent<Entity_>
- All Implemented Interfaces:
ChangeEvent
@NullMarked
public record ListElementsChangeEvent<Entity_>(Entity_ entity, int changeStartIndexInclusive, int changeEndIndexExclusive)
extends Record
implements ChangeEvent
-
Constructor Summary
ConstructorsConstructorDescriptionListElementsChangeEvent(Entity_ entity, int changeStartIndexInclusive, int changeEndIndexExclusive) Creates an instance of aListElementsChangeEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thechangeEndIndexExclusiverecord component.intReturns the value of thechangeStartIndexInclusiverecord component.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ListElementsChangeEvent
public ListElementsChangeEvent(Entity_ entity, int changeStartIndexInclusive, int changeEndIndexExclusive) Creates an instance of aListElementsChangeEventrecord class.- Parameters:
entity- the value for theentityrecord componentchangeStartIndexInclusive- the value for thechangeStartIndexInclusiverecord componentchangeEndIndexExclusive- the value for thechangeEndIndexExclusiverecord component
-
-
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 '=='. -
entity
Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-
changeStartIndexInclusive
public int changeStartIndexInclusive()Returns the value of thechangeStartIndexInclusiverecord component.- Returns:
- the value of the
changeStartIndexInclusiverecord component
-
changeEndIndexExclusive
public int changeEndIndexExclusive()Returns the value of thechangeEndIndexExclusiverecord component.- Returns:
- the value of the
changeEndIndexExclusiverecord component
-