Class ELKIServiceScanner.DirClassIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.String>
    Enclosing class:
    ELKIServiceScanner

    private static class ELKIServiceScanner.DirClassIterator
    extends java.lang.Object
    implements java.util.Iterator<java.lang.String>
    Class to iterate over a directory tree.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String CLASS_EXT  
      private static int CLASS_EXT_LENGTH  
      private static java.lang.String FACTORY_FILE_EXT  
      private java.util.ArrayList<java.lang.String> files  
      private java.util.ArrayList<java.io.File> folders  
      private java.lang.String prefix  
    • Constructor Summary

      Constructors 
      Constructor Description
      DirClassIterator​(java.io.File path)
      Constructor from Directory
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void findNext()
      Find the next entry, since we need to skip some directories.
      boolean hasNext()  
      java.lang.String next()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Field Detail

      • FACTORY_FILE_EXT

        private static final java.lang.String FACTORY_FILE_EXT
        See Also:
        Constant Field Values
      • CLASS_EXT_LENGTH

        private static final int CLASS_EXT_LENGTH
      • prefix

        private java.lang.String prefix
      • files

        private java.util.ArrayList<java.lang.String> files
      • folders

        private java.util.ArrayList<java.io.File> folders
    • Constructor Detail

      • DirClassIterator

        public DirClassIterator​(java.io.File path)
        Constructor from Directory
        Parameters:
        path - Directory to iterate over
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.String>
      • findNext

        private void findNext()
        Find the next entry, since we need to skip some directories.
      • next

        public java.lang.String next()
        Specified by:
        next in interface java.util.Iterator<java.lang.String>