Class Pair.SimplePair<F,S>

java.lang.Object
ru.progrm_jarvis.javacommons.object.Pair.SimplePair<F,S>
Type Parameters:
F - type of the first value
S - type of the second value
All Implemented Interfaces:
Pair<F,S>
Enclosing interface:
Pair<F,S>

public static final class Pair.SimplePair<F,S> extends Object implements Pair<F,S>
Simple implementation of Pair.
  • Method Details

    • getFirst

      public F getFirst()
      Description copied from interface: Pair
      Gets the first value.
      Specified by:
      getFirst in interface Pair<F,S>
      Returns:
      the first value
    • getSecond

      public S getSecond()
      Description copied from interface: Pair
      Gets the second value.
      Specified by:
      getSecond in interface Pair<F,S>
      Returns:
      the second value
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object