Class Pair<A,​B>


  • public abstract class Pair<A,​B>
    extends Object
    • Constructor Detail

      • Pair

        public Pair()
    • Method Detail

      • fst

        public abstract A fst()
      • snd

        public abstract B snd()
      • of

        public static <A,​B> Pair<A,​B> of​(A fst,
                                                     B snd)
      • allPairs

        public static <A,​B> Set<Pair<A,​B>> allPairs​(Set<? extends A> fstSet,
                                                                Set<? extends B> sndSet)
      • swap

        public Pair<B,​A> swap()
      • mapFst

        public <C> Pair<C,​B> mapFst​(Function<? super A,​? extends C> mapper)
      • mapSnd

        public <C> Pair<A,​C> mapSnd​(Function<? super B,​? extends C> mapper)
      • withFst

        public <C> Pair<C,​B> withFst​(C fst)
      • withSnd

        public <C> Pair<A,​C> withSnd​(C snd)