Class Pair<K,​V>

    • Constructor Detail

      • Pair

        public Pair​(K key,
                    V value)
    • Method Detail

      • of

        @NotNull
        @Contract(value="_, _ -> new",
                  pure=true)
        public static <K,​V> Pair<K,​V> of​(K key,
                                                     V value)
        Constructs a new Pair with static method
        Type Parameters:
        K - the first element type
        V - the second element type
        Parameters:
        key - the first element
        value - the second element
        Returns:
        the pair
      • getKey

        public K getKey()
      • getValue

        public V getValue()
      • getLeft

        public K getLeft()
      • getRight

        public V getRight()
      • getFirst

        public K getFirst()
      • getSecond

        public V getSecond()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object