Class ImmutableIntIntMapKeySet

    • Field Detail

      • keysValues

        private final int[] keysValues
      • occupiedWithData

        private final int occupiedWithData
      • containsZeroKey

        private final boolean containsZeroKey
      • containsOneKey

        private final boolean containsOneKey
    • Constructor Detail

      • ImmutableIntIntMapKeySet

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

      • 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
      • 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
      • 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
      • writeReplace

        private java.lang.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)