mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SCRIPT Move java files
This commit is contained in:
committed by
Peter Johnson
parent
7ca1be9bae
commit
c350c5f112
26
commandsv3/src/main/java/org/wpilib/command3/Binding.java
Normal file
26
commandsv3/src/main/java/org/wpilib/command3/Binding.java
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package org.wpilib.commands3;
|
||||
|
||||
import edu.wpi.first.util.ErrorMessages;
|
||||
|
||||
/**
|
||||
* A single trigger binding.
|
||||
*
|
||||
* @param scope The scope in which the binding is active.
|
||||
* @param type The type of binding; or, when the bound command should run
|
||||
* @param command The bound command. Cannot be null.
|
||||
* @param frames The stack frames when the binding was created. Used for telemetry and error
|
||||
* reporting so if a command throws an exception, we can tell users where that command was bound
|
||||
* instead of giving a fairly useless backtrace of the command framework.
|
||||
*/
|
||||
record Binding(BindingScope scope, BindingType type, Command command, StackTraceElement[] frames) {
|
||||
public Binding {
|
||||
ErrorMessages.requireNonNullParam(scope, "scope", "Binding");
|
||||
ErrorMessages.requireNonNullParam(type, "type", "Binding");
|
||||
ErrorMessages.requireNonNullParam(command, "command", "Binding");
|
||||
ErrorMessages.requireNonNullParam(frames, "frames", "Binding");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user