mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Remove unnecessary boxing (#7539)
* Remove unnecessary boxing Also remove unnecessary warning suppression * Use more idiomatic functional interfaces in NumericalIntegration
This commit is contained in:
@@ -26,8 +26,8 @@ public class CounterTest extends AbstractComsSetup {
|
||||
private static FakeCounterFixture counter = null;
|
||||
private static final Logger logger = Logger.getLogger(CounterTest.class.getName());
|
||||
|
||||
Integer m_input;
|
||||
Integer m_output;
|
||||
int m_input;
|
||||
int m_output;
|
||||
|
||||
@Override
|
||||
protected Logger getClassLogger() {
|
||||
@@ -40,10 +40,7 @@ public class CounterTest extends AbstractComsSetup {
|
||||
* @param input The input Port
|
||||
* @param output The output Port
|
||||
*/
|
||||
public CounterTest(Integer input, Integer output) {
|
||||
assert input != null;
|
||||
assert output != null;
|
||||
|
||||
public CounterTest(int input, int output) {
|
||||
m_input = input;
|
||||
m_output = output;
|
||||
// System.out.println("Counter Test: Input: " + input + " Output: " +
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DIOCrossConnectTest extends AbstractInterruptTest {
|
||||
* @param input The port for the input wire
|
||||
* @param output The port for the output wire
|
||||
*/
|
||||
public DIOCrossConnectTest(Integer input, Integer output) {
|
||||
public DIOCrossConnectTest(int input, int output) {
|
||||
if (dio != null) {
|
||||
dio.teardown();
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class PDPTest extends AbstractComsSetup {
|
||||
* @param mef Motor encoder fixture.
|
||||
* @param expectedCurrentDraw Expected current draw in Amps.
|
||||
*/
|
||||
public PDPTest(MotorEncoderFixture<?> mef, Double expectedCurrentDraw) {
|
||||
public PDPTest(MotorEncoderFixture<?> mef, double expectedCurrentDraw) {
|
||||
logger.fine("Constructor with: " + mef.getType());
|
||||
if (me != null && !me.equals(mef)) {
|
||||
me.teardown();
|
||||
|
||||
@@ -41,9 +41,9 @@ public class PIDTest extends AbstractComsSetup {
|
||||
private PIDController m_controller = null;
|
||||
private static MotorEncoderFixture<?> me = null;
|
||||
|
||||
private final Double m_p;
|
||||
private final Double m_i;
|
||||
private final Double m_d;
|
||||
private final double m_p;
|
||||
private final double m_i;
|
||||
private final double m_d;
|
||||
|
||||
@Override
|
||||
protected Logger getClassLogger() {
|
||||
@@ -58,7 +58,7 @@ public class PIDTest extends AbstractComsSetup {
|
||||
* @param d D gain.
|
||||
* @param mef Motor encoder fixture.
|
||||
*/
|
||||
public PIDTest(Double p, Double i, Double d, MotorEncoderFixture<?> mef) {
|
||||
public PIDTest(double p, double i, double d, MotorEncoderFixture<?> mef) {
|
||||
logger.fine("Constructor with: " + mef.getType());
|
||||
if (PIDTest.me != null && !PIDTest.me.equals(mef)) {
|
||||
PIDTest.me.teardown();
|
||||
|
||||
@@ -37,10 +37,8 @@ public class DIOCrossConnectFixture implements ITestFixture {
|
||||
* @param input The port of the {@link DigitalInput}
|
||||
* @param output The port of the {@link DigitalOutput}
|
||||
*/
|
||||
public DIOCrossConnectFixture(Integer input, Integer output) {
|
||||
assert input != null;
|
||||
assert output != null;
|
||||
assert !input.equals(output);
|
||||
public DIOCrossConnectFixture(int input, int output) {
|
||||
assert input != output;
|
||||
m_input = new DigitalInput(input);
|
||||
m_output = new DigitalOutput(output);
|
||||
m_allocated = true;
|
||||
|
||||
Reference in New Issue
Block a user