Class Pair<A,​B>

java.lang.Object
pygar.documents.Pair<A,​B>
Type Parameters:
A -
B -

public class Pair<A,​B>
extends java.lang.Object
n.b., the Pygar Project uses the Pair class in a very early unit called SimpleXmlMatcher.java. The file was broken when the Pair class was withdrawn. We include this contributed file as a patch - but bear in mind that the Pair class and SimpleXmlMatcher are deprecated for future development work.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    A fst  
    B snd  
  • Constructor Summary

    Constructors 
    Constructor Description
    Pair​(A fst, B snd)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object other)  
    int hashCode()  
    static <A,​ B> Pair<A,​B> of​(A a, B b)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • fst

      public final A fst
    • snd

      public final B snd
  • Constructor Details

    • Pair

      public Pair​(A fst, B snd)
  • Method Details

    • toString

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

      public boolean equals​(java.lang.Object other)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • of

      public static <A,​ B> Pair<A,​B> of​(A a, B b)