Class ImmutableCharMapKeySet

All Implemented Interfaces:
Serializable, CharIterable, ImmutableCharCollection, PrimitiveIterable, CharSet, ImmutableCharSet

class ImmutableCharMapKeySet extends AbstractImmutableCharSet 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 char EMPTY_KEY
      See Also:
    • REMOVED_KEY

      private static final char 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 char[] keys
    • occupiedWithData

      private final int occupiedWithData
    • containsZeroKey

      private final boolean containsZeroKey
    • containsOneKey

      private final boolean containsOneKey
  • Constructor Details

    • ImmutableCharMapKeySet

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

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

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

      public ImmutableCharSet select(CharPredicate predicate)
      Description copied from interface: CharIterable
      Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.
      Specified by:
      select in interface CharIterable
      Specified by:
      select in interface CharSet
      Specified by:
      select in interface ImmutableCharCollection
      Specified by:
      select in interface ImmutableCharSet
    • reject

      public ImmutableCharSet reject(CharPredicate predicate)
      Description copied from interface: CharIterable
      Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.
      Specified by:
      reject in interface CharIterable
      Specified by:
      reject in interface CharSet
      Specified by:
      reject in interface ImmutableCharCollection
      Specified by:
      reject in interface ImmutableCharSet
    • collect

      public <V> ImmutableSet<V> collect(CharToObjectFunction<? extends V> function)
      Description copied from interface: CharIterable
      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 CharIterable
      Specified by:
      collect in interface CharSet
      Specified by:
      collect in interface ImmutableCharCollection
      Specified by:
      collect in interface ImmutableCharSet
    • detectIfNone

      public char detectIfNone(CharPredicate predicate, char ifNone)
      Specified by:
      detectIfNone 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
    • sum

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

      public char max()
      Specified by:
      max in interface CharIterable
    • min

      public char min()
      Specified by:
      min in interface CharIterable
    • injectInto

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

      private 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)