Class MetroIIDEDirectorForPtides.Pair<F,​S>

  • Type Parameters:
    F - The first element
    S - The second element
    Enclosing class:
    MetroIIDEDirectorForPtides

    public static class MetroIIDEDirectorForPtides.Pair<F,​S>
    extends java.lang.Object
    Pair is a data structure used to store two elements.
    Author:
    Liangpeng Guo
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(F first, S second)
      Constructs a pair of elements.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      F getFirst()
      Gets the first element in the pair.
      S getSecond()
      Gets the second element in the pair.
      void setFirst​(F first)
      Sets the first element in the pair.
      void setSecond​(S second)
      Sets the second element in the pair.
      • Methods inherited from class java.lang.Object

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

      • Pair

        public Pair​(F first,
                    S second)
        Constructs a pair of elements.
        Parameters:
        first - the first element.
        second - the second element.
    • Method Detail

      • setFirst

        public void setFirst​(F first)
        Sets the first element in the pair.
        Parameters:
        first - the element to be set.
        See Also:
        getFirst()
      • setSecond

        public void setSecond​(S second)
        Sets the second element in the pair.
        Parameters:
        second - the element to be set.
        See Also:
        getSecond()
      • getFirst

        public F getFirst()
        Gets the first element in the pair.
        Returns:
        the first element.
        See Also:
        setFirst(F)
      • getSecond

        public S getSecond()
        Gets the second element in the pair.
        Returns:
        the second element.
        See Also:
        setSecond(S)