Class ListMap.Values

  • All Implemented Interfaces:
    java.lang.Iterable<V>, java.util.Collection<V>
    Enclosing class:
    ListMap<K,​V>

    private class ListMap.Values
    extends java.util.AbstractCollection<V>
    Represents the values collection of the enclosing map given by ListMap.values().

    Like base class AbstractCollection, this class supports neither Collection.add(Object) nor Collection.addAll(Collection), i.e. those methods throw an UnsupportedOperationException. In contrast, this class supports methods Set.clear(), Collection.remove(Object), Collection.removeAll(Collection) and Collection.retainAll(Collection). The iterator returned by iterator() supports @link Iterator#remove()}.

    See Also:
    ListMap.valuesColl
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Values()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears actually the enclosing ListMap delegating to ListMap.clear().
      boolean contains​(java.lang.Object obj)
      Returns actually whether obj is a value of the enclosing ListMap delegating to ListMap.containsValue(Object).
      java.util.Iterator<V> iterator()
      Returns actually an instance of ListMap.ValuesIterator.
      boolean remove​(java.lang.Object obj)
      Interpretes obj as value of the enclosing ListMap and removes the first according key-value pair if present.
      int size()
      Returns actually the size of the enclosing ListMap delegating to ListMap.size().
      • Methods inherited from class java.util.AbstractCollection

        add, addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Constructor Detail

      • Values

        private Values()
    • Method Detail

      • iterator

        public java.util.Iterator<V> iterator()
        Returns actually an instance of ListMap.ValuesIterator.
        Specified by:
        iterator in interface java.util.Collection<V>
        Specified by:
        iterator in interface java.lang.Iterable<V>
        Specified by:
        iterator in class java.util.AbstractCollection<V>
      • size

        public int size()
        Returns actually the size of the enclosing ListMap delegating to ListMap.size().
        Specified by:
        size in interface java.util.Collection<V>
        Specified by:
        size in class java.util.AbstractCollection<V>
      • contains

        public boolean contains​(java.lang.Object obj)
        Returns actually whether obj is a value of the enclosing ListMap delegating to ListMap.containsValue(Object).
        Specified by:
        contains in interface java.util.Collection<V>
        Overrides:
        contains in class java.util.AbstractCollection<V>
      • remove

        public boolean remove​(java.lang.Object obj)
        Interpretes obj as value of the enclosing ListMap and removes the first according key-value pair if present. Returns whether the according key-value pair was present when invoking this method invoking using ListMap.removeIdx(int).
        Specified by:
        remove in interface java.util.Collection<V>
        Overrides:
        remove in class java.util.AbstractCollection<V>
      • clear

        public void clear()
        Clears actually the enclosing ListMap delegating to ListMap.clear().
        Specified by:
        clear in interface java.util.Collection<V>
        Overrides:
        clear in class java.util.AbstractCollection<V>