Class MultiCollector

    • Field Detail

      • cacheScores

        private final boolean cacheScores
      • collectors

        private final Collector[] collectors
    • Constructor Detail

      • MultiCollector

        private MultiCollector​(Collector... collectors)
    • Method Detail

      • wrap

        public static Collector wrap​(java.lang.Iterable<? extends Collector> collectors)
        Wraps a list of Collectors with a MultiCollector. This method works as follows:
        • Filters out the null collectors, so they are not used during search time.
        • If the input contains 1 real collector (i.e. non-null ), it is returned.
        • Otherwise the method returns a MultiCollector which wraps the non-null ones.
        Throws:
        java.lang.IllegalArgumentException - if either 0 collectors were input, or all collectors are null.
      • scoreMode

        public ScoreMode scoreMode()
        Description copied from interface: Collector
        Indicates what features are required from the scorer.
        Specified by:
        scoreMode in interface Collector