Class ObjectCollections.EmptyCollection<K>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addAll​(java.util.Collection<? extends K> c)  
      void clear()  
      boolean contains​(java.lang.Object k)  
      boolean containsAll​(java.util.Collection<?> c)  
      boolean equals​(java.lang.Object o)  
      void forEach​(java.util.function.Consumer<? super K> action)  
      int hashCode()  
      ObjectBidirectionalIterator<K> iterator()
      Returns a type-specific iterator on the elements of this collection.
      boolean removeAll​(java.util.Collection<?> c)  
      boolean removeIf​(java.util.function.Predicate<? super K> filter)  
      boolean retainAll​(java.util.Collection<?> c)  
      int size()  
      ObjectSpliterator<K> spliterator()
      Returns a type-specific spliterator on the elements of this collection.
      java.lang.Object[] toArray()  
      <T> T[] toArray​(T[] array)  
      • Methods inherited from class java.util.AbstractCollection

        add, isEmpty, remove
      • Methods inherited from class java.lang.Object

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

        add, isEmpty, parallelStream, remove, stream, toArray
    • Method Detail

      • contains

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

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<K>
        Overrides:
        toArray in class java.util.AbstractCollection<K>
      • toArray

        public <T> T[] toArray​(T[] array)
        Specified by:
        toArray in interface java.util.Collection<K>
        Overrides:
        toArray in class java.util.AbstractCollection<K>
      • spliterator

        public ObjectSpliterator<K> spliterator()
        Description copied from interface: ObjectCollection
        Returns a type-specific spliterator on the elements of this collection.

        See Collection.spliterator() for more documentation on the requirements of the returned spliterator.

        Returns:
        a type-specific spliterator on the elements of this collection.
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<K>
        Specified by:
        size in class java.util.AbstractCollection<K>
      • clear

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

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<K>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<K>
        Overrides:
        equals in class java.lang.Object
      • forEach

        public void forEach​(java.util.function.Consumer<? super K> action)
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<K>
        Overrides:
        containsAll in class java.util.AbstractCollection<K>
      • addAll

        public boolean addAll​(java.util.Collection<? extends K> c)
        Specified by:
        addAll in interface java.util.Collection<K>
        Overrides:
        addAll in class java.util.AbstractCollection<K>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<K>
        Overrides:
        removeAll in class java.util.AbstractCollection<K>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<K>
        Overrides:
        retainAll in class java.util.AbstractCollection<K>
      • removeIf

        public boolean removeIf​(java.util.function.Predicate<? super K> filter)