Class Pair<T>

java.lang.Object
kieker.analysis.generic.clustering.mtree.utils.Pair<T>
Type Parameters:
T - The type of the objects.

public class Pair<T>
extends java.lang.Object
A pair of objects of the same type.
Since:
2.0.0
Author:
Eduardo R. D'Avila
  • Constructor Summary

    Constructors 
    Constructor Description
    Pair()
    Creates a pair of null objects.
    Pair​(T first, T second)
    Creates a pair with the objects specified in the arguments.
  • Method Summary

    Modifier and Type Method Description
    T get​(int index)
    Accesses an object by its index.
    T getFirst()  
    T getSecond()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pair

      public Pair()
      Creates a pair of null objects.
    • Pair

      public Pair​(T first, T second)
      Creates a pair with the objects specified in the arguments.
      Parameters:
      first - The first object.
      second - The second object.
  • Method Details

    • get

      public T get​(int index) throws InternalErrorException
      Accesses an object by its index. The first object has index 0 and the second object has index 1.
      Parameters:
      index - The index of the object to be accessed.
      Returns:
      The first object if index is 0; the second object if index is 1.
      Throws:
      InteranlErrorException - If index is neither 0 or 1.
      InternalErrorException
    • getFirst

      public T getFirst()
    • getSecond

      public T getSecond()