Class UnmodifiableKeyValueList<K,V>

All Implemented Interfaces:
Serializable, Iterable<V>, Collection<V>, List<V>, SequencedCollection<V>, Collection2, KeyValueList<K,V>

public class UnmodifiableKeyValueList<K,V> extends UnmodifiableList<V> implements KeyValueList<K,V>
Created by vpc on 8/25/16.
See Also:
  • Method Details

    • getByKey

      public V getByKey(K k)
      Specified by:
      getByKey in interface KeyValueList<K,V>
    • removeByKey

      public V removeByKey(K k)
      Specified by:
      removeByKey in interface KeyValueList<K,V>
    • containsKey

      public boolean containsKey(Object key)
      Specified by:
      containsKey in interface KeyValueList<K,V>
    • containsMappedValue

      public boolean containsMappedValue(V value)
      Description copied from interface: KeyValueList
      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.
      Specified by:
      containsMappedValue in interface KeyValueList<K,V>
      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
    • getByValue

      public V getByValue(V value)
      Description copied from interface: KeyValueList
      returns, it it exists, the value in this list with the same key for value param
      Specified by:
      getByValue in interface KeyValueList<K,V>
      Parameters:
      value - value whose key presence in this map is to be tested
      Returns:
      value of the list equivalent to the given value
    • containsValue

      public boolean containsValue(Object value)
      Description copied from interface: KeyValueList
      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)).
      Specified by:
      containsValue in interface KeyValueList<K,V>
      Parameters:
      value - element whose presence in this list is to be tested
      Returns:
      true if this list contains the specified element
    • keySet

      public Set<K> keySet()
      Specified by:
      keySet in interface KeyValueList<K,V>