Interface KeyValueList<K,V>

All Superinterfaces:
Collection<V>, Collection2, Iterable<V>, List<V>, SequencedCollection<V>
All Known Implementing Classes:
DefaultKeyValueList, UnmodifiableKeyValueList

public interface KeyValueList<K,V> extends List<V>, Collection2
a Map that implements List interface was named MapList
  • Method Details

    • getByKey

      V getByKey(K k)
    • removeByKey

      V removeByKey(K k)
    • containsKey

      boolean containsKey(Object key)
    • containsMappedValue

      boolean containsMappedValue(V value)
      Returns true if this map maps one or more keys to the specified value. More formally, returns true if and only if this map contains at least one mapping to a value v such that (value==null ? v==null : value.equals(v)). This operation will probably require time linear in the map size for most implementations of the Map interface.
      Parameters:
      value - value whose presence in this map is to be tested
      Returns:
      true if this map maps one or more keys to the specified value
      Throws:
      ClassCastException - if the value is of an inappropriate type for this map (optional)
      NullPointerException - if the specified value is null and this map does not permit null values (optional)
    • getByValue

      V getByValue(V value)
      returns, it it exists, the value in this list with the same key for value param
      Parameters:
      value - value whose key presence in this map is to be tested
      Returns:
      value of the list equivalent to the given value
    • containsValue

      boolean containsValue(Object value)
      Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null ? e==null : o.equals(e)).
      Parameters:
      value - element whose presence in this list is to be tested
      Returns:
      true if this list contains the specified element
      Throws:
      ClassCastException - if the type of the specified element is incompatible with this list (optional)
      NullPointerException - if the specified element is null and this list does not permit null elements (optional)
    • keySet

      Set<K> keySet()
    • append

      default KeyValueList<K,V> append(V v)
    • appendAll

      default KeyValueList<K,V> appendAll(Collection<V> v)