net.damf.console.comperation.fileHandle
Class Search

java.lang.Object
  extended by net.damf.console.comperation.command.ConsoleCommand
      extended by net.damf.console.comperation.fileHandle.Search
All Implemented Interfaces:
Comperation

public class Search
extends ConsoleCommand


Field Summary
private  boolean allTermsNeeded
           
private  boolean searchForFile
           
private  boolean searchRecursive
           
private  char[][] searchTerm
           
private  java.io.File startFile
           
 
Fields inherited from class net.damf.console.comperation.command.ConsoleCommand
flag, fluked, inited
 
Constructor Summary
Search()
           
 
Method Summary
 int argumentsNeeded()
           
 Comperation giveFiles(java.lang.String[] files)
           
protected  char handleFlags()
           
private  void handleSearchInfo(SearchInfo searchInfo)
           
 java.lang.String[] make(java.lang.String[] param)
           
private  SearchInfo newSearchInfo(java.io.File file)
           
 boolean perform()
           
private  void performForDir(java.io.File dir)
           
private  SearchInfo performForFile(java.io.File file)
           
private  SearchInfo performForString(java.io.File file, java.lang.String str)
           
 boolean requiresCommand()
           
private  boolean[] singleTerm(int chib, int term, boolean[] found)
           
 
Methods inherited from class net.damf.console.comperation.command.ConsoleCommand
crunchQuotes, gatherFlags, isInited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startFile

private java.io.File startFile

searchTerm

private char[][] searchTerm

allTermsNeeded

private boolean allTermsNeeded

searchForFile

private boolean searchForFile

searchRecursive

private boolean searchRecursive
Constructor Detail

Search

public Search()
Method Detail

requiresCommand

public final boolean requiresCommand()
Specified by:
requiresCommand in interface Comperation
Overrides:
requiresCommand in class ConsoleCommand

argumentsNeeded

public final int argumentsNeeded()
Specified by:
argumentsNeeded in interface Comperation
Overrides:
argumentsNeeded in class ConsoleCommand

make

public java.lang.String[] make(java.lang.String[] param)
Specified by:
make in interface Comperation
Specified by:
make in class ConsoleCommand

handleFlags

protected char handleFlags()

giveFiles

public Comperation giveFiles(java.lang.String[] files)
Specified by:
giveFiles in interface Comperation
Specified by:
giveFiles in class ConsoleCommand

perform

public boolean perform()
Specified by:
perform in interface Comperation
Specified by:
perform in class ConsoleCommand

performForDir

private void performForDir(java.io.File dir)

performForString

private SearchInfo performForString(java.io.File file,
                                    java.lang.String str)

newSearchInfo

private SearchInfo newSearchInfo(java.io.File file)

handleSearchInfo

private void handleSearchInfo(SearchInfo searchInfo)

performForFile

private SearchInfo performForFile(java.io.File file)

singleTerm

private boolean[] singleTerm(int chib,
                             int term,
                             boolean[] found)