Class CollectionList

    • Constructor Detail

      • CollectionList

        public CollectionList​(String collectionName,
                              String list,
                              org.slf4j.Logger logger)
      • CollectionList

        public CollectionList​(String collectionName,
                              String root,
                              List<MFile> mfiles,
                              org.slf4j.Logger logger)
      • CollectionList

        protected CollectionList​(String collectionName,
                                 org.slf4j.Logger logger)
    • Method Detail

      • getFilesSorted

        public Iterable<MFile> getFilesSorted()
        Description copied from interface: MCollection
        Get the current collection of MFile. if hasDateExtractor() == true, these will be sorted by Date, otherwise by path.
        Returns:
        current collection of MFile as an Iterable.
      • getFileIterator

        public CloseableIterator<MFile> getFileIterator()
        Description copied from interface: MCollection
        Get the current collection of MFile, no guaranteed order. May be faster than getFilesSorted() for large collections, use when order is not important.
         try (CloseableIterator iter = getFileIterator()) {
           while (iter.hasNext()) {
             MFile file = iter.next();
           }
         }
         
        Returns:
        current collection of MFile as an CloseableIterator.
      • close

        public void close()
        Description copied from interface: MCollection
        Close and release any resources. Do not make further calls on this object.