Class Pair<F,S>

java.lang.Object
com.avoka.core.util.Pair<F,S>
Type Parameters:
F - the type of the first component of the pair
S - the type of the second component of the pair

public class Pair<F,S> extends Object
A strongly typed pair of items.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The first object in the pair
    The second object in the pair
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an uninitialised pair
    Pair(F firstObject, S secondObject)
    Constructs a pair of the given objects
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the first object in the pair Added to enable Velocity to resolve ${pair.first}
    Return the second object in the pair Added to enable Velocity to resolve ${pair.second}
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • first

      public F first
      The first object in the pair
    • second

      public S second
      The second object in the pair
  • Constructor Details

    • Pair

      public Pair()
      Constructs an uninitialised pair
    • Pair

      public Pair(F firstObject, S secondObject)
      Constructs a pair of the given objects
      Parameters:
      firstObject - the first object
      secondObject - the second object
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object
      Since:
      4.3.3
    • getFirst

      public F getFirst()
      Return the first object in the pair Added to enable Velocity to resolve ${pair.first}
      Returns:
      the first object
      Since:
      17.11.0
    • getSecond

      public S getSecond()
      Return the second object in the pair Added to enable Velocity to resolve ${pair.second}
      Returns:
      the second object
      Since:
      17.11.0