Record Class MuseumRouteOptimizer.OptimizedRoute
java.lang.Object
java.lang.Record
org.episteme.social.arts.MuseumRouteOptimizer.OptimizedRoute
- All Implemented Interfaces:
Serializable
- Enclosing class:
MuseumRouteOptimizer
public static record MuseumRouteOptimizer.OptimizedRoute(List<MuseumRouteOptimizer.Artwork> order, int totalDurationMinutes, double totalDistance, double importanceScore)
extends Record
implements Serializable
Recommended sequence of artworks to visit.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOptimizedRoute(List<MuseumRouteOptimizer.Artwork> order, int totalDurationMinutes, double totalDistance, double importanceScore) Creates an instance of aOptimizedRouterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theimportanceScorerecord component.order()Returns the value of theorderrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalDistancerecord component.intReturns the value of thetotalDurationMinutesrecord component.
-
Constructor Details
-
OptimizedRoute
public OptimizedRoute(List<MuseumRouteOptimizer.Artwork> order, int totalDurationMinutes, double totalDistance, double importanceScore) Creates an instance of aOptimizedRouterecord class.- Parameters:
order- the value for theorderrecord componenttotalDurationMinutes- the value for thetotalDurationMinutesrecord componenttotalDistance- the value for thetotalDistancerecord componentimportanceScore- the value for theimportanceScorerecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
order
Returns the value of theorderrecord component.- Returns:
- the value of the
orderrecord component
-
totalDurationMinutes
public int totalDurationMinutes()Returns the value of thetotalDurationMinutesrecord component.- Returns:
- the value of the
totalDurationMinutesrecord component
-
totalDistance
public double totalDistance()Returns the value of thetotalDistancerecord component.- Returns:
- the value of the
totalDistancerecord component
-
importanceScore
public double importanceScore()Returns the value of theimportanceScorerecord component.- Returns:
- the value of the
importanceScorerecord component
-