Class IntPair

java.lang.Object
com.landawn.abacus.util.IntPair
All Implemented Interfaces:
Immutable

@Beta @Immutable public final class IntPair extends Object implements Immutable
Since:
1.2
Author:
Haiyang Li
  • Field Details

    • _1

      public final int _1
    • _2

      public final int _2
  • Method Details

    • of

      public static IntPair of(int _1, int _2)
      Parameters:
      _1 - the 1
      _2 - the 2
      Returns:
    • min

      public int min()
      Returns:
    • max

      public int max()
      Returns:
    • sum

      public int sum()
      Returns:
    • average

      public double average()
      Returns:
    • reverse

      public IntPair reverse()
      Returns:
    • forEach

      public <E extends Exception> void forEach(Throwables.IntConsumer<E> comsumer) throws E
      Type Parameters:
      E -
      Parameters:
      comsumer -
      Throws:
      E - the e
    • accept

      public <E extends Exception> void accept(Throwables.IntBiConsumer<E> action) throws E
      Type Parameters:
      E -
      Parameters:
      action -
      Throws:
      E - the e
    • map

      public <U, E extends Exception> U map(Throwables.IntBiFunction<U,E> mapper) throws E
      Type Parameters:
      U -
      E -
      Parameters:
      mapper -
      Returns:
      Throws:
      E - the e
    • filter

      public <E extends Exception> u.Optional<IntPair> filter(Throwables.IntBiPredicate<E> predicate) throws E
      Type Parameters:
      E -
      Parameters:
      predicate -
      Returns:
      Throws:
      E - the e
    • stream

      public IntStream stream()
      Returns:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Parameters:
      obj -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns: