Package ru.bitel.common.model

# Class KeyValue<K extends java.lang.Comparable<K>,​V>

java.lang.Object
ru.bitel.common.model.KeyValue<K,​V>

All Implemented Interfaces:
  `java.lang.Comparable<KeyValue<K,​V>>`, `java.util.Map.Entry<K,​V>`, `GuiTitlable`

    public class KeyValue<K extends java.lang.Comparable<K>,​V>
    extends java.lang.Object
    implements java.util.Map.Entry<K,​V>, java.lang.Comparable<KeyValue<K,​V>>, GuiTitlable

- ## Field Summary

  Fields
  Modifier and Type | Field | Description
  --- | --- | ---
  `protected K` | `key` |
  `protected V` | `value` |

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `KeyValue()` |
  `KeyValue​(K key, V value)` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `int` | `compareTo​(KeyValue<K,​V> o)` |
  `boolean` | `equals​(java.lang.Object obj)` |
  `java.lang.String` | `getGuiTitle()` | Строка - имя объекта.
  `K` | `getKey()` |
  `V` | `getValue()` |
  `int` | `hashCode()` |
  `void` | `setKey​(K key)` |
  `V` | `setValue​(V value)` |
  `java.lang.String` | `toString()` |

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### key

    protected K extends java.lang.Comparable<K> key

  - ### value

    protected V value

- ## Constructor Details

  - ### KeyValue

    public KeyValue()

  - ### KeyValue

    public KeyValue​(K key, V value)

- ## Method Details

  - ### getKey

    public K getKey()
    Specified by:
      `getKey` in interface `java.util.Map.Entry<K extends java.lang.Comparable<K>,​V>`

  - ### setKey

    public void setKey​(K key)

  - ### getValue

    public V getValue()
    Specified by:
      `getValue` in interface `java.util.Map.Entry<K extends java.lang.Comparable<K>,​V>`

  - ### setValue

    public V setValue​(V value)
    Specified by:
      `setValue` in interface `java.util.Map.Entry<K extends java.lang.Comparable<K>,​V>`

  - ### compareTo

    public int compareTo​(KeyValue<K,​V> o)
    Specified by:
      `compareTo` in interface `java.lang.Comparable<K extends java.lang.Comparable<K>>`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in interface `java.util.Map.Entry<K extends java.lang.Comparable<K>,​V>`
    Overrides:
      `hashCode` in class `java.lang.Object`

  - ### equals

    public boolean equals​(java.lang.Object obj)
    Specified by:
      `equals` in interface `java.util.Map.Entry<K extends java.lang.Comparable<K>,​V>`
    Overrides:
      `equals` in class `java.lang.Object`

  - ### toString

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

  - ### getGuiTitle

    public java.lang.String getGuiTitle()
    Description copied from interface: `GuiTitlable`
    Строка - имя объекта. Скорее всего уникальная. Используется в комбобоксах, например, итд.
    Specified by:
      `getGuiTitle` in interface `GuiTitlable`
    Returns:
      Строка - представление объекта.