Class LayerManager.ExtendCheck

java.lang.Object
org.apache.commons.collections4.bloomfilter.LayerManager.ExtendCheck
Enclosing class:
LayerManager

public static final class LayerManager.ExtendCheck extends Object
A collection of common ExtendCheck implementations to test whether to extend the depth of a LayerManager.
  • Method Details

    • advanceOnCount

      public static Predicate<LayerManager> advanceOnCount(int breakAt)
      Creates a new target after a specific number of filters have been added to the current target.
      Parameters:
      breakAt - the number of filters to merge into each filter in the list.
      Returns:
      A Predicate suitable for the LayerManager extendCheck parameter.
      Throws:
      IllegalArgumentException - if breakAt <= 0
    • advanceOnPopulated

      Advances the target once a merge has been performed.
      Returns:
      A Predicate suitable for the LayerManager extendCheck parameter.
    • advanceOnSaturation

      public static Predicate<LayerManager> advanceOnSaturation(double maxN)
      Creates a new target after the current target is saturated. Saturation is defined as the Bloom filter estimated N >= maxN.

      An example usage is advancing on a calculated saturation by calling: ExtendCheck.advanceOnSaturation(shape.estimateMaxN())

      Parameters:
      maxN - the maximum number of estimated items in the filter.
      Returns:
      A Predicate suitable for the LayerManager extendCheck parameter.
      Throws:
      IllegalArgumentException - if maxN <= 0
    • neverAdvance

      Does not automatically advance the target. @{code next()} must be called directly to perform the advance.
      Returns:
      A Predicate suitable for the LayerManager extendCheck parameter.