Class ImmutableIntIntMapKeySet

All Implemented Interfaces:
Serializable, ImmutableIntCollection, IntIterable, PrimitiveIterable, ImmutableIntSet, IntSet

class ImmutableIntIntMapKeySet extends AbstractImmutableIntSet implements Serializable
This file was automatically generated from template file immutablePrimitivePrimitiveMapKeySet.stg
Since:
6.0.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • EMPTY_KEY

      private static final int EMPTY_KEY
      See Also:
    • REMOVED_KEY

      private static final int 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:
    • keysValues

      private final int[] keysValues
    • occupiedWithData

      private final int occupiedWithData
    • containsZeroKey

      private final boolean containsZeroKey
    • containsOneKey

      private final boolean containsOneKey
  • Constructor Details

    • ImmutableIntIntMapKeySet

      ImmutableIntIntMapKeySet(int[] keysValues, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
  • Method Details

    • isEmptyKey

      private static boolean isEmptyKey(int key)
    • isRemovedKey

      private static boolean isRemovedKey(int key)
    • isNonSentinel

      private static boolean isNonSentinel(int key)
    • hashCode

      public int hashCode()
      Description copied from interface: IntSet
      Follows the same general contract as Set.hashCode().
      Specified by:
      hashCode in interface IntSet
      Specified by:
      hashCode in class AbstractIntSet
    • 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
    • intIterator

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

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

      public int[] toArray(int[] array)
      Description copied from interface: IntIterable
      Converts the IntIterable to a primitive int 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 IntIterable
    • contains

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

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

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

      public ImmutableIntSet select(IntPredicate predicate)
      Description copied from interface: IntIterable
      Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.
      Specified by:
      select in interface ImmutableIntCollection
      Specified by:
      select in interface ImmutableIntSet
      Specified by:
      select in interface IntIterable
      Specified by:
      select in interface IntSet
    • reject

      public ImmutableIntSet reject(IntPredicate predicate)
      Description copied from interface: IntIterable
      Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.
      Specified by:
      reject in interface ImmutableIntCollection
      Specified by:
      reject in interface ImmutableIntSet
      Specified by:
      reject in interface IntIterable
      Specified by:
      reject in interface IntSet
    • collect

      public <V> ImmutableSet<V> collect(IntToObjectFunction<? extends V> function)
      Description copied from interface: IntIterable
      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 ImmutableIntCollection
      Specified by:
      collect in interface ImmutableIntSet
      Specified by:
      collect in interface IntIterable
      Specified by:
      collect in interface IntSet
    • detectIfNone

      public int detectIfNone(IntPredicate predicate, int ifNone)
      Specified by:
      detectIfNone in interface IntIterable
    • count

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

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

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

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

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

      public int max()
      Specified by:
      max in interface IntIterable
    • min

      public int min()
      Specified by:
      min in interface IntIterable
    • injectInto

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

      private Object writeReplace()
    • probe

      int probe(int element)
    • probeTwo

      int probeTwo(int element, int removedIndex)
    • probeThree

      int probeThree(int element, int removedIndex)
    • spreadAndMask

      int spreadAndMask(int element)
    • spreadTwoAndMask

      int spreadTwoAndMask(int element)
    • mask

      private int mask(int spread)