Class ReferenceSets.Singleton<K>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addAll​(java.util.Collection<? extends K> c)  
      java.lang.Object clone()  
      boolean contains​(java.lang.Object k)  
      ObjectListIterator<K> iterator()
      Returns a type-specific iterator on the elements of this collection.
      boolean remove​(java.lang.Object k)  
      boolean removeAll​(java.util.Collection<?> c)  
      boolean retainAll​(java.util.Collection<?> c)  
      int size()  
      • Methods inherited from class java.util.AbstractCollection

        add, clear, containsAll, isEmpty, toArray, toArray
      • Methods inherited from class java.lang.Object

        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, clear, containsAll, isEmpty, spliterator, toArray, toArray
    • Method Detail

      • contains

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

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

        public ObjectListIterator<K> iterator()
        Description copied from interface: ReferenceCollection
        Returns a type-specific iterator on the elements of this collection.

        Note that this specification strengthens the one given in Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extends Collection.

        Specified by:
        iterator in interface java.util.Collection<K>
        Specified by:
        iterator in interface java.lang.Iterable<K>
        Specified by:
        iterator in interface ObjectIterable<K>
        Specified by:
        iterator in interface ReferenceCollection<K>
        Specified by:
        iterator in interface ReferenceSet<K>
        Specified by:
        iterator in interface java.util.Set<K>
        Specified by:
        iterator in class AbstractReferenceSet<K>
        Returns:
        a type-specific iterator on the elements of this collection.
        See Also:
        Iterable.iterator()
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<K>
        Specified by:
        size in interface java.util.Set<K>
        Specified by:
        size 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>
        Specified by:
        addAll in interface java.util.Set<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>
        Specified by:
        removeAll in interface java.util.Set<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>
        Specified by:
        retainAll in interface java.util.Set<K>
        Overrides:
        retainAll in class java.util.AbstractCollection<K>
      • clone

        public java.lang.Object clone()