Class ImmutableLongMapKeySet

All Implemented Interfaces:
Serializable, ImmutableLongCollection, LongIterable, PrimitiveIterable, ImmutableLongSet, LongSet

class ImmutableLongMapKeySet extends AbstractImmutableLongSet implements Serializable
This file was automatically generated from template file immutablePrimitiveMapKeySet.stg
Since:
6.0.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • EMPTY_KEY

      private static final long EMPTY_KEY
      See Also:
    • REMOVED_KEY

      private static final long REMOVED_KEY
      See Also:
    • CACHE_LINE_SIZE

      private static final int CACHE_LINE_SIZE
      See Also:
    • KEY_SIZE

      private static final int KEY_SIZE
      See Also:
    • INITIAL_LINEAR_PROBE

      private static final int INITIAL_LINEAR_PROBE
      See Also:
    • keys

      private final long[] keys
    • occupiedWithData

      private final int occupiedWithData
    • containsZeroKey

      private final boolean containsZeroKey
    • containsOneKey

      private final boolean containsOneKey
  • Constructor Details

    • ImmutableLongMapKeySet

      ImmutableLongMapKeySet(long[] keys, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
  • Method Details

    • isEmptyKey

      private static boolean isEmptyKey(long key)
    • isRemovedKey

      private static boolean isRemovedKey(long key)
    • isNonSentinel

      private static boolean isNonSentinel(long key)
    • hashCode

      public int hashCode()
      Description copied from interface: LongSet
      Follows the same general contract as Set.hashCode().
      Specified by:
      hashCode in interface LongSet
      Specified by:
      hashCode in class AbstractLongSet
    • size

      public int size()
      Description copied from interface: PrimitiveIterable
      Returns the number of items in this iterable.
      Specified by:
      size in interface PrimitiveIterable
    • appendString

      public void appendString(Appendable appendable, String start, String separator, String end)
      Description copied from interface: PrimitiveIterable
      Prints a string representation of this collection onto the given Appendable. Prints the string returned by PrimitiveIterable.makeString(String, String, String).
      Specified by:
      appendString in interface PrimitiveIterable
    • longIterator

      public LongIterator longIterator()
      Description copied from interface: LongIterable
      Returns a primitive iterator that can be used to iterate over the LongIterable in an imperative style.
      Specified by:
      longIterator in interface LongIterable
    • toArray

      public long[] toArray()
      Description copied from interface: LongIterable
      Converts the LongIterable to a primitive long array.
      Specified by:
      toArray in interface LongIterable
    • toArray

      public long[] toArray(long[] array)
      Description copied from interface: LongIterable
      Converts the LongIterable to a primitive long array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.
      Specified by:
      toArray in interface LongIterable
    • contains

      public boolean contains(long value)
      Description copied from interface: LongIterable
      Returns true if the value is contained in the LongIterable, and false if it is not.
      Specified by:
      contains in interface LongIterable
    • forEach

      public void forEach(LongProcedure procedure)
      Description copied from interface: LongIterable
      Applies the LongProcedure to each element in the LongIterable.
      Specified by:
      forEach in interface LongIterable
    • each

      public void each(LongProcedure procedure)
      Description copied from interface: LongIterable
      A synonym for forEach.
      Specified by:
      each in interface LongIterable
      Since:
      7.0.
    • select

      public ImmutableLongSet select(LongPredicate predicate)
      Description copied from interface: LongIterable
      Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.
      Specified by:
      select in interface ImmutableLongCollection
      Specified by:
      select in interface ImmutableLongSet
      Specified by:
      select in interface LongIterable
      Specified by:
      select in interface LongSet
    • reject

      public ImmutableLongSet reject(LongPredicate predicate)
      Description copied from interface: LongIterable
      Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.
      Specified by:
      reject in interface ImmutableLongCollection
      Specified by:
      reject in interface ImmutableLongSet
      Specified by:
      reject in interface LongIterable
      Specified by:
      reject in interface LongSet
    • collect

      public <V> ImmutableSet<V> collect(LongToObjectFunction<? extends V> function)
      Description copied from interface: LongIterable
      Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.
      Specified by:
      collect in interface ImmutableLongCollection
      Specified by:
      collect in interface ImmutableLongSet
      Specified by:
      collect in interface LongIterable
      Specified by:
      collect in interface LongSet
    • detectIfNone

      public long detectIfNone(LongPredicate predicate, long ifNone)
      Specified by:
      detectIfNone in interface LongIterable
    • count

      public int count(LongPredicate predicate)
      Description copied from interface: LongIterable
      Returns a count of the number of elements in the LongIterable that return true for the specified predicate.
      Specified by:
      count in interface LongIterable
    • anySatisfy

      public boolean anySatisfy(LongPredicate predicate)
      Description copied from interface: LongIterable
      Returns true if any of the elements in the LongIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      anySatisfy in interface LongIterable
    • allSatisfy

      public boolean allSatisfy(LongPredicate predicate)
      Description copied from interface: LongIterable
      Returns true if all of the elements in the LongIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      allSatisfy in interface LongIterable
    • noneSatisfy

      public boolean noneSatisfy(LongPredicate predicate)
      Description copied from interface: LongIterable
      Returns true if none of the elements in the LongIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      noneSatisfy in interface LongIterable
    • sum

      public long sum()
      Specified by:
      sum in interface LongIterable
    • max

      public long max()
      Specified by:
      max in interface LongIterable
    • min

      public long min()
      Specified by:
      min in interface LongIterable
    • injectInto

      public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)
      Specified by:
      injectInto in interface LongIterable
    • writeReplace

      private Object writeReplace()
    • probe

      int probe(long element)
    • probeTwo

      int probeTwo(long element, int removedIndex)
    • probeThree

      int probeThree(long element, int removedIndex)
    • spreadAndMask

      int spreadAndMask(long element)
    • spreadTwoAndMask

      int spreadTwoAndMask(long element)
    • mask

      private int mask(int spread)