mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] Move Java classes to edu.wpi.first.math (#3316)
This commit is contained in:
28
wpimath/src/main/java/edu/wpi/first/math/Pair.java
Normal file
28
wpimath/src/main/java/edu/wpi/first/math/Pair.java
Normal file
@@ -0,0 +1,28 @@
|
||||
// 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 edu.wpi.first.math;
|
||||
|
||||
public class Pair<A, B> {
|
||||
private final A m_first;
|
||||
private final B m_second;
|
||||
|
||||
public Pair(A first, B second) {
|
||||
m_first = first;
|
||||
m_second = second;
|
||||
}
|
||||
|
||||
public A getFirst() {
|
||||
return m_first;
|
||||
}
|
||||
|
||||
public B getSecond() {
|
||||
return m_second;
|
||||
}
|
||||
|
||||
@SuppressWarnings("ParameterName")
|
||||
public static <A, B> Pair<A, B> of(A a, B b) {
|
||||
return new Pair<>(a, b);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user