Package weka.gui
Class SimpleCLIPanel.CommandlineCompletion
- java.lang.Object
-
- weka.gui.SimpleCLIPanel.CommandlineCompletion
-
- Enclosing class:
- SimpleCLIPanel
public static class SimpleCLIPanel.CommandlineCompletion extends Object
A class for commandline completion of classnames.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description CommandlineCompletion()default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector<String>getClassMatches(String partial)returns all the class/package matches with the partial search string.StringgetClassname(String partial)returns the classname part of the partial classname.StringgetCommonPrefix(Vector<String> list)returns the common prefix for all the items in the list.booleangetDebug()returns whether debug mode is on.Vector<String>getFileMatches(String partial)returns all the file/dir matches with the partial search string.Vector<String>getMatches(String partial)returns all the matches with the partial search string, files or classes.StringgetPackage(String partial)returns the packages part of the partial classname.booleanisClassname(String partial)tests whether the given partial string is the name of a class with classpath - it basically tests, whether the string consists only of alphanumeric literals, underscores and dots.voidsetDebug(boolean value)sets debug mode on/off.
-
-
-
Method Detail
-
getDebug
public boolean getDebug()
returns whether debug mode is on.- Returns:
- true if debug is on
-
setDebug
public void setDebug(boolean value)
sets debug mode on/off.- Parameters:
value- if true then debug mode is on
-
isClassname
public boolean isClassname(String partial)
tests whether the given partial string is the name of a class with classpath - it basically tests, whether the string consists only of alphanumeric literals, underscores and dots.- Parameters:
partial- the string to test- Returns:
- true if it looks like a classname
-
getPackage
public String getPackage(String partial)
returns the packages part of the partial classname.- Parameters:
partial- the partial classname- Returns:
- the package part of the partial classname
-
getClassname
public String getClassname(String partial)
returns the classname part of the partial classname.- Parameters:
partial- the partial classname- Returns:
- the class part of the classname
-
getFileMatches
public Vector<String> getFileMatches(String partial)
returns all the file/dir matches with the partial search string.- Parameters:
partial- the partial search string- Returns:
- all the matches
-
getClassMatches
public Vector<String> getClassMatches(String partial)
returns all the class/package matches with the partial search string.- Parameters:
partial- the partial search string- Returns:
- all the matches
-
getMatches
public Vector<String> getMatches(String partial)
returns all the matches with the partial search string, files or classes.- Parameters:
partial- the partial search string- Returns:
- all the matches
-
-