Class Pairs


  • public class Pairs
    extends java.lang.Object
    Utility methods for using Pair instances
    Since:
    2014-06-26
    • Constructor Summary

      Constructors 
      Constructor Description
      Pairs()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​W>
      java.util.List<T>
      listFirst​(java.util.List<Pair<T,​W>> list)
      Return a List of the first items from a list of pairs
      static <T,​W>
      java.util.List<W>
      listSecond​(java.util.List<Pair<T,​W>> list)
      Return a List of the second items from a list of pairs
      • Methods inherited from class java.lang.Object

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

      • Pairs

        public Pairs()
    • Method Detail

      • listFirst

        public static <T,​W> java.util.List<T> listFirst​(java.util.List<Pair<T,​W>> list)
        Return a List of the first items from a list of pairs
        Type Parameters:
        T - first type
        W - second type
        Parameters:
        list - list
        Returns:
        list of firsts
      • listSecond

        public static <T,​W> java.util.List<W> listSecond​(java.util.List<Pair<T,​W>> list)
        Return a List of the second items from a list of pairs
        Type Parameters:
        T - first type
        W - second type
        Parameters:
        list - list
        Returns:
        list of seconds