Class ElementsSupplierWithRepeats

  • All Implemented Interfaces:
    Supplier<uk.gov.gchq.gaffer.data.element.Element>

    public class ElementsSupplierWithRepeats
    extends ElementsSupplier
    This class extends ElementsSupplier by maintaining a cache of some of the Elements that have previously been output, and with a certain probability, reoutputting an Element that has previously been output.
    • Constructor Detail

      • ElementsSupplierWithRepeats

        public ElementsSupplierWithRepeats​(Supplier<Set<uk.gov.gchq.gaffer.data.element.Element>> elementSupplier,
                                           double repeatProb,
                                           Cache<uk.gov.gchq.gaffer.data.element.Element> cache)
    • Method Detail

      • get

        public uk.gov.gchq.gaffer.data.element.Element get()
        Specified by:
        get in interface Supplier<uk.gov.gchq.gaffer.data.element.Element>
        Overrides:
        get in class ElementsSupplier