Record Class Detour
java.lang.Object
java.lang.Record
com.cta4j.model.bus.Detour
- Record Components:
id- the unique identifier of the detourversion- the version number of the detouractive- whether the detour is currently activedescription- a description of the detourrouteDirections- the list of route directions affected by the detourstartTime- the start time of the detourendTime- the end time of the detour
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.Returns the value of thedescriptionrecord component.endTime()Returns the value of theendTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of therouteDirectionsrecord component.Returns the value of thestartTimerecord component.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
-
Constructor Details
-
Detour
public Detour(String id, int version, boolean active, String description, List<DetourRouteDirection> routeDirections, Instant startTime, Instant endTime) Creates an instance of aDetourrecord class.- Parameters:
id- the value for theidrecord componentversion- the value for theversionrecord componentactive- the value for theactiverecord componentdescription- the value for thedescriptionrecord componentrouteDirections- the value for therouteDirectionsrecord componentstartTime- the value for thestartTimerecord componentendTime- the value for theendTimerecord 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. -
id
-
version
-
active
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
routeDirections
Returns the value of therouteDirectionsrecord component.- Returns:
- the value of the
routeDirectionsrecord component
-
startTime
-
endTime
-