Package 

Class CandidateHarvesterSet

  • All Implemented Interfaces:
    java.lang.Iterable , java.util.Collection , java.util.Set

    
    public class CandidateHarvesterSet
    extends AbstractSet<CandidateHarvester>
                        

    Implements Set of CandidateHarvesters which runs the gathering of candidate addresses performed by its elements in parallel.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      CandidateHarvesterSet() Initializes a new CandidateHarvesterSet instance.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      boolean add(CandidateHarvester harvester) Adds a specific CandidateHarvester to this CandidateHarvesterSet and returns true if it is not already present.
      void harvest(Component component) Gathers candidate addresses for a specific Component.
      void harvest(List<Component> components, TrickleCallback trickleCallback) Gathers candidate addresses for a specific Component.
      Iterator<CandidateHarvester> iterator() Returns an Iterator over the CandidateHarvesters which are elements in this CandidateHarvesterSet.
      int size() Returns the number of CandidateHarvesters which are elements in this CandidateHarvesterSet.
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
      • Methods inherited from class java.util.Collection

        parallelStream, removeIf, spliterator, stream
      • Methods inherited from class java.lang.Iterable

        forEach, iterator, spliterator
      • Methods inherited from class java.util.Set

        copyOf, of
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CandidateHarvesterSet

        CandidateHarvesterSet()
        Initializes a new CandidateHarvesterSet instance.
    • Method Detail

      • add

         boolean add(CandidateHarvester harvester)

        Adds a specific CandidateHarvester to this CandidateHarvesterSet and returns true if it is not already present. Otherwise, leaves this set unchanged and returns false.

        Parameters:
        harvester - the CandidateHarvester to be added to this CandidateHarvesterSet
      • harvest

         void harvest(Component component)

        Gathers candidate addresses for a specific Component. CandidateHarvesterSet delegates to the CandidateHarvesters which are its Set elements.

        Parameters:
        component - the Component to gather candidate addresses for
      • harvest

         void harvest(List<Component> components, TrickleCallback trickleCallback)

        Gathers candidate addresses for a specific Component. CandidateHarvesterSet delegates to the CandidateHarvesters which are its Set elements.

        Parameters:
        components - the Component to gather candidate addresses for
        trickleCallback - the TrickleCallback that we will be feeding candidates to, or null in case the application doesn't want us trickling any candidates
      • iterator

         Iterator<CandidateHarvester> iterator()

        Returns an Iterator over the CandidateHarvesters which are elements in this CandidateHarvesterSet. The elements are returned in no particular order.

      • size

         int size()

        Returns the number of CandidateHarvesters which are elements in this CandidateHarvesterSet.