Class Long2LongHashMap.EntrySet

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>, java.util.Collection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>, java.util.Set<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
    Enclosing class:
    Long2LongHashMap

    public final class Long2LongHashMap.EntrySet
    extends java.util.AbstractSet<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
    Set of entries which supports optionally cached iterators to avoid allocation.
    • Constructor Summary

      Constructors 
      Constructor Description
      EntrySet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      boolean contains​(java.lang.Object o)
      boolean isEmpty()
      Long2LongHashMap.EntryIterator iterator()
      boolean removeIfLong​(LongLongPredicate filter)
      Removes all the elements of this collection that satisfy the given predicate.
      int size()
      java.lang.Object[] toArray()
      <T> T[] toArray​(T[] a)
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        add, addAll, containsAll, remove, retainAll, toString
      • Methods inherited from class java.lang.Object

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

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

        forEach
      • Methods inherited from interface java.util.Set

        add, addAll, containsAll, remove, retainAll, spliterator
    • Constructor Detail

      • EntrySet

        public EntrySet()
    • Method Detail

      • iterator

        public Long2LongHashMap.EntryIterator iterator()
        Specified by:
        iterator in interface java.util.Collection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        iterator in interface java.lang.Iterable<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        iterator in interface java.util.Set<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        iterator in class java.util.AbstractCollection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        size in interface java.util.Set<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        size in class java.util.AbstractCollection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        isEmpty in interface java.util.Set<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Overrides:
        isEmpty in class java.util.AbstractCollection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        clear in interface java.util.Set<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Overrides:
        clear in class java.util.AbstractCollection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
      • contains

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

        public boolean removeIfLong​(LongLongPredicate filter)
        Removes all the elements of this collection that satisfy the given predicate.

        NB: Renamed from removeIf to avoid overloading on parameter types of lambda expression, which doesn't play well with type inference in lambda expressions.

        Parameters:
        filter - a predicate to apply.
        Returns:
        true if at least one entry was removed.
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        toArray in interface java.util.Set<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Overrides:
        toArray in class java.util.AbstractCollection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Specified by:
        toArray in interface java.util.Set<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>
        Overrides:
        toArray in class java.util.AbstractCollection<java.util.Map.Entry<java.lang.Long,​java.lang.Long>>