K - the type of the key elementsV - the type of the value elementspublic final class ComparableEntry<K,V>
extends java.lang.Object
implements java.util.Map.Entry<K,V>, java.lang.Comparable<java.util.Map.Entry<? extends K,? extends V>>
ComparableEntry is Comparable if and only if the key is Comparable.| Constructor and Description |
|---|
ComparableEntry(K key,
V value)
Creates a
ComparableEntry. |
ComparableEntry(java.util.Map.Entry<? extends K,? extends V> entry)
Creates a
ComparableEntry. |
public ComparableEntry(K key, V value)
ComparableEntry.key - of the entryvalue - of the entrypublic ComparableEntry(java.util.Map.Entry<? extends K,? extends V> entry)
ComparableEntry.entry - any Entry