Class Object2LongHashMap.ValueCollection

  • All Implemented Interfaces:
    java.lang.Iterable<java.lang.Long>, java.util.Collection<java.lang.Long>
    Enclosing class:
    Object2LongHashMap<K>

    public final class Object2LongHashMap.ValueCollection
    extends java.util.AbstractCollection<java.lang.Long>
    Collection of values which can optionally cache iterators to avoid allocation.
    • Constructor Summary

      Constructors 
      Constructor Description
      ValueCollection()
      Create a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      boolean contains​(long value)
      Checks if the value is contained in the map.
      boolean contains​(java.lang.Object o)
      Object2LongHashMap.ValueIterator iterator()
      boolean removeIfLong​(java.util.function.LongPredicate filter)
      Removes all the elements of this collection that satisfy the given predicate.
      int size()
      • Methods inherited from class java.util.AbstractCollection

        add, addAll, containsAll, isEmpty, remove, 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

      • ValueCollection

        public ValueCollection()
        Create a new instance.
    • Method Detail

      • iterator

        public Object2LongHashMap.ValueIterator iterator()
        Specified by:
        iterator in interface java.util.Collection<java.lang.Long>
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Long>
        Specified by:
        iterator in class java.util.AbstractCollection<java.lang.Long>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<java.lang.Long>
        Specified by:
        size in class java.util.AbstractCollection<java.lang.Long>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<java.lang.Long>
        Overrides:
        contains in class java.util.AbstractCollection<java.lang.Long>
      • contains

        public boolean contains​(long value)
        Checks if the value is contained in the map.
        Parameters:
        value - to be checked.
        Returns:
        true if value is contained in this map.
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<java.lang.Long>
        Overrides:
        clear in class java.util.AbstractCollection<java.lang.Long>
      • removeIfLong

        public boolean removeIfLong​(java.util.function.LongPredicate filter)
        Removes all the elements of this collection that satisfy the given predicate.
        Parameters:
        filter - a predicate which returns true for elements to be removed.
        Returns:
        true if any elements were removed.