Class Pair<F,S>

java.lang.Object
com.mojang.datafixers.util.Pair<F,S>
All Implemented Interfaces:
App<Pair.Mu<S>,F>

public class Pair<F,S> extends Object implements App<Pair.Mu<S>,F>
  • Constructor Details

    • Pair

      public Pair(F first, S second)
  • Method Details

    • unbox

      public static <F, S> Pair<F,S> unbox(App<Pair.Mu<S>,F> box)
    • getFirst

      public F getFirst()
    • getSecond

      public S getSecond()
    • swap

      public Pair<S,F> swap()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • mapFirst

      public <F2> Pair<F2,S> mapFirst(Function<? super F,? extends F2> function)
    • mapSecond

      public <S2> Pair<F,S2> mapSecond(Function<? super S,? extends S2> function)
    • of

      public static <F, S> Pair<F,S> of(F first, S second)
    • toMap

      public static <F, S> Collector<Pair<F,S>,?,Map<F,S>> toMap()