Record Class SimulationFacade.PlanSimCorrespondence
java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.scheduler.simulation.SimulationFacade.PlanSimCorrespondence
- Enclosing interface:
SimulationFacade
-
Constructor Summary
ConstructorsConstructorDescriptionPlanSimCorrespondence(Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId, gov.nasa.jpl.aerie.types.ActivityDirective> directiveIdActivityDirectiveMap) Creates an instance of aPlanSimCorrespondencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionMap<gov.nasa.jpl.aerie.types.ActivityDirectiveId, gov.nasa.jpl.aerie.types.ActivityDirective> Returns the value of thedirectiveIdActivityDirectiveMaprecord component.booleanIndicates whether some other object is "equal to" this one.Optional<Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId, gov.nasa.jpl.aerie.types.ActivityDirectiveId>> Performs an ID-agnostic equals check, but also generates a transformation for IDs that do not match between the two plans.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlanSimCorrespondence
public PlanSimCorrespondence(Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId, gov.nasa.jpl.aerie.types.ActivityDirective> directiveIdActivityDirectiveMap) Creates an instance of aPlanSimCorrespondencerecord class.- Parameters:
directiveIdActivityDirectiveMap- the value for thedirectiveIdActivityDirectiveMaprecord component
-
-
Method Details
-
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). -
equalsWithIdMap
public Optional<Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId>> equalsWithIdMap(SimulationFacade.PlanSimCorrespondence other) Performs an ID-agnostic equals check, but also generates a transformation for IDs that do not match between the two plans. This function is anti-symmetric; `a.equalsWithIdMap(b)` will return a map from `a` ids to `b` ids, which is the reverse of `b.equalsWithIdMap(a)`.- Returns:
- Either `Optional.empty` if the plans are not equal, or `Optional.of(map)` if they are equal, where `map` contains a mapping between *only the IDs that are different* between the two plans.
-
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. -
directiveIdActivityDirectiveMap
public Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirective> directiveIdActivityDirectiveMap()Returns the value of thedirectiveIdActivityDirectiveMaprecord component.- Returns:
- the value of the
directiveIdActivityDirectiveMaprecord component
-