Package org.mpi_sws.jmc.strategies.trust
Record Class SchedulingChoiceWrapper
java.lang.Object
java.lang.Record
org.mpi_sws.jmc.strategies.trust.SchedulingChoiceWrapper
Represents a scheduling choice with an optional location.
-
Constructor Summary
ConstructorsConstructorDescriptionSchedulingChoiceWrapper(SchedulingChoice<?> choice) Creates a new scheduling choice with the given choice and empty location.SchedulingChoiceWrapper(SchedulingChoice<?> choice, Integer location) Creates an instance of aSchedulingChoiceWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchoice()Returns the value of thechoicerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether the scheduling choice has a location.location()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SchedulingChoiceWrapper
Creates a new scheduling choice with the given choice and empty location.- Parameters:
choice- The choice.
-
SchedulingChoiceWrapper
Creates an instance of aSchedulingChoiceWrapperrecord class.- Parameters:
choice- the value for thechoicerecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
hasLocation
public boolean hasLocation()Returns whether the scheduling choice has a location.- Returns:
- Whether the scheduling choice has a location.
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
choice
Returns the value of thechoicerecord component.- Returns:
- the value of the
choicerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-