Class RegularImmutableMap.KeySet<K>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<K>, java.util.Collection<K>, java.util.Set<K>
    Enclosing class:
    RegularImmutableMap<K,​V>

    private static final class RegularImmutableMap.KeySet<K>
    extends IndexedImmutableSet<K>
    • Method Detail

      • contains

        public boolean contains​(@CheckForNull
                                java.lang.Object object)
        Specified by:
        contains in interface java.util.Collection<K>
        Specified by:
        contains in interface java.util.Set<K>
        Specified by:
        contains in class ImmutableCollection<K>
      • isPartialView

        boolean isPartialView()
        Description copied from class: ImmutableCollection
        Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods. This is generally used to determine whether copyOf implementations should make an explicit copy to avoid memory leaks.
        Specified by:
        isPartialView in class ImmutableCollection<K>
      • 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>