Package org.wpilib.commands3
Record Class ConflictDetector.Conflict
java.lang.Object
java.lang.Record
org.wpilib.commands3.ConflictDetector.Conflict
- Record Components:
a- The first conflicting command.b- The second conflicting command.- The set of mechanisms required by both commands. This set is read-only
- Enclosing class:
ConflictDetector
public static record ConflictDetector.Conflict(Command a, Command b, Set<Mechanism> sharedRequirements)
extends Record
A conflict between two commands.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiona()Returns the value of thearecord component.b()Returns the value of thebrecord component.Gets a descriptive message for the conflict.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thesharedRequirementsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Conflict
Creates an instance of aConflictrecord class.- Parameters:
a- the value for thearecord componentb- the value for thebrecord componentsharedRequirements- the value for thesharedRequirementsrecord component
-
-
Method Details
-
description
Gets a descriptive message for the conflict. The description includes the names of the conflicting commands and the names of all mechanisms required by both commands.- Returns:
- A description of the conflict.
-
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
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). -
a
Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-
b
Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-