Class RankedSet.ConfigBuilder

    • Constructor Detail

      • ConfigBuilder

        protected ConfigBuilder()
      • ConfigBuilder

        protected ConfigBuilder​(RankedSet.HashFunction hashFunction,
                                int nlevels,
                                boolean countDuplicates)
    • Method Detail

      • setHashFunction

        public RankedSet.ConfigBuilder setHashFunction​(RankedSet.HashFunction hashFunction)
        Set the hash function to use. It is possible to change the hash function of an existing ranked set, although this is not recommended since the distribution in the skip list may become uneven as a result.
        Parameters:
        hashFunction - the hash function to use
        Returns:
        this builder
      • getNLevels

        public int getNLevels()
      • setNLevels

        public RankedSet.ConfigBuilder setNLevels​(int nlevels)
        Set the hash function to use. It is not currently possible to change the number of levels for an existing ranked set.
        Parameters:
        nlevels - the number of levels to use
        Returns:
        this builder
      • isCountDuplicates

        public boolean isCountDuplicates()
      • setCountDuplicates

        public RankedSet.ConfigBuilder setCountDuplicates​(boolean countDuplicates)
        Set whether to count duplicate keys separately. If duplicate keys are counted separately, ranks after them are increased by the number of duplicates.
        Parameters:
        countDuplicates - whether to count duplicates
        Returns:
        this builder