Class Pair<L,​R>


  • public class Pair<L,​R>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(L left, R right)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<L> asList()
      If the left and right members of the pair have the same type, return a list of the members.
      static <A,​B>
      Pair<A,​B>
      create​(A left, B right)  
      static boolean equal​(java.lang.Object o1, java.lang.Object o2)  
      boolean equals​(java.lang.Object o)  
      L getLeft()  
      R getRight()  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Pair

        public Pair​(L left,
                    R right)
    • Method Detail

      • getRight

        public R getRight()
      • getLeft

        public L getLeft()
      • create

        public static <A,​B> Pair<A,​B> create​(A left,
                                                         B right)
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • equal

        public static final boolean equal​(java.lang.Object o1,
                                          java.lang.Object o2)
      • hashCode

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

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

        public java.util.List<L> asList()
        If the left and right members of the pair have the same type, return a list of the members. Else, return null TODO Test this code!!