Class SimpleEntry<K,V>

java.lang.Object
net.luis.utils.collection.util.SimpleEntry<K,V>
Type Parameters:
K - The type of the key
V - The type of the value
All Implemented Interfaces:
Map.Entry<K,V>
Direct Known Subclasses:
MutableEntry

@Unmodifiable public class SimpleEntry<K,V> extends Object implements Map.Entry<K,V>
A simple immutable implementation of the Map.Entry interface.
See Also:
  • Field Details

    • key

      private final K key
      The key of the entry.
    • value

      protected V value
      The value of the entry.
  • Constructor Details

    • SimpleEntry

      public SimpleEntry(@NotNull K key, @Nullable V value)
      Constructs a new simple entry with the specified key and value.
      Parameters:
      key - The key of the entry
      value - The value of the entry
      Throws:
      NullPointerException - If the key is null
  • Method Details