Class ImmutableCharMapKeySet

    • Field Detail

      • keys

        private final char[] keys
      • occupiedWithData

        private final int occupiedWithData
      • containsZeroKey

        private final boolean containsZeroKey
      • containsOneKey

        private final boolean containsOneKey
    • Constructor Detail

      • ImmutableCharMapKeySet

        ImmutableCharMapKeySet​(char[] keys,
                               int occupiedWithData,
                               boolean containsZeroKey,
                               boolean containsOneKey)
    • Method Detail

      • isEmptyKey

        private static boolean isEmptyKey​(char key)
      • isRemovedKey

        private static boolean isRemovedKey​(char key)
      • isNonSentinel

        private static boolean isNonSentinel​(char key)
      • hashCode

        public int hashCode()
        Description copied from interface: CharSet
        Follows the same general contract as Set.hashCode().
        Specified by:
        hashCode in interface CharSet
        Specified by:
        hashCode in class AbstractCharSet
      • charIterator

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

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

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

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

        public void forEach​(CharProcedure procedure)
        Description copied from interface: CharIterable
        Applies the CharProcedure to each element in the CharIterable.
        Specified by:
        forEach in interface CharIterable
      • count

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

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

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

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

        private java.lang.Object writeReplace()
      • probe

        int probe​(char element)
      • probeTwo

        int probeTwo​(char element,
                     int removedIndex)
      • probeThree

        int probeThree​(char element,
                       int removedIndex)
      • spreadAndMask

        int spreadAndMask​(char element)
      • spreadTwoAndMask

        int spreadTwoAndMask​(char element)
      • mask

        private int mask​(int spread)