Class Pair<A>

java.lang.Object
org.opt4j.optimizer.ea.Pair<A>
Type Parameters:
A - the type of the paired objects

public class Pair<A> extends Object
The Pair groups two objects of the same type in a given order.
  • Field Details

    • first

      protected final A first
    • second

      protected final A second
  • Constructor Details

    • Pair

      public Pair(A first, A second)
      Constructs a Pair with a first and a second element.
      Parameters:
      first - the first object
      second - the second object
  • Method Details

    • getFirst

      public A getFirst()
      Returns the first element.
      Returns:
      the first element
    • getSecond

      public A getSecond()
      Returns the second element.
      Returns:
      the second element