001// Copyright (c) FIRST and other WPILib contributors. 002// Open Source Software; you can modify and/or share it under the terms of 003// the WPILib BSD license file in the root directory of this project. 004 005package edu.wpi.first.math; 006 007public class Pair<A, B> { 008 private final A m_first; 009 private final B m_second; 010 011 public Pair(A first, B second) { 012 m_first = first; 013 m_second = second; 014 } 015 016 public A getFirst() { 017 return m_first; 018 } 019 020 public B getSecond() { 021 return m_second; 022 } 023 024 @SuppressWarnings("ParameterName") 025 public static <A, B> Pair<A, B> of(A a, B b) { 026 return new Pair<>(a, b); 027 } 028}