protected DirectoryScanner createPartition(int partitionIndex, int partitionCount) { DirectoryScanner that = new DirectoryScanner(); that.filePatternRegexp = this.filePatternRegexp; that.regex = this.regex; that.partitionIndex = partitionIndex; that.partitionCount = partitionCount; return that; }