Class LimitedSizeIteratorUtil


  • public class LimitedSizeIteratorUtil
    extends Object
    Author:
    Jerven Bolleman, SIB Swiss Institute of Bioinformatics
    • Constructor Detail

      • LimitedSizeIteratorUtil

        public LimitedSizeIteratorUtil()
    • Method Detail

      • add

        public static <V> boolean add​(V object,
                                      Collection<V> excludeSet,
                                      AtomicLong used,
                                      long maxSize)
                               throws QueryEvaluationException
        Parameters:
        object - object to put in set if not there already.
        excludeSet - set that we need to store object in.
        used - AtomicLong tracking how many elements we have in storage.
        maxSize -
        Throws:
        QueryEvaluationException - when the object is added to the set and the total elements in all limited size collections exceed the allowed maxSize.