Class Pair<L,​R>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map.Entry<L,​R>

    public class Pair<L,​R>
    extends java.lang.Object
    implements java.io.Serializable, java.util.Map.Entry<L,​R>
    Author:
    Baptiste Mesta
    See Also:
    Serialized Form
    • Constructor Detail

      • Pair

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

      • of

        public static <L,​R> Pair<L,​R> of​(L left,
                                                     R right)
      • pair

        public static <L,​R> Pair<L,​R> pair​(L left,
                                                       R right)
      • mapOf

        public static <L,​R> java.util.Map<L,​R> mapOf​(Pair<L,​R>... entries)
      • getLeft

        public L getLeft()
      • getRight

        public R getRight()
      • getKey

        public final L getKey()
        Specified by:
        getKey in interface java.util.Map.Entry<L,​R>
      • getValue

        public R getValue()
        Specified by:
        getValue in interface java.util.Map.Entry<L,​R>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map.Entry<L,​R>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Map.Entry<L,​R>
        Overrides:
        equals in class java.lang.Object
      • toString

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

        public R setValue​(R right)
        Specified by:
        setValue in interface java.util.Map.Entry<L,​R>
      • setKey

        public L setKey​(L left)