Class ImmutableByteByteMapKeySet

    • Field Detail

      • keysValues

        private final byte[] keysValues
      • occupiedWithData

        private final int occupiedWithData
      • containsZeroKey

        private final boolean containsZeroKey
      • containsOneKey

        private final boolean containsOneKey
    • Constructor Detail

      • ImmutableByteByteMapKeySet

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

      • isEmptyKey

        private static boolean isEmptyKey​(byte key)
      • isRemovedKey

        private static boolean isRemovedKey​(byte key)
      • isNonSentinel

        private static boolean isNonSentinel​(byte key)
      • hashCode

        public int hashCode()
        Description copied from interface: ByteSet
        Follows the same general contract as Set.hashCode().
        Specified by:
        hashCode in interface ByteSet
        Specified by:
        hashCode in class AbstractByteSet
      • byteIterator

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

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

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

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

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

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

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

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

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

        private java.lang.Object writeReplace()
      • probe

        int probe​(byte element)
      • spreadAndMask

        int spreadAndMask​(byte element)
      • mask

        private int mask​(int spread)