Class ImmutableLongMapKeySet

    • Field Detail

      • keys

        private final long[] keys
      • occupiedWithData

        private final int occupiedWithData
      • containsZeroKey

        private final boolean containsZeroKey
      • containsOneKey

        private final boolean containsOneKey
    • Constructor Detail

      • ImmutableLongMapKeySet

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

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

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