public abstract class AbstractConsoleArgument extends AbstractHandlerPlugin<LinkedList<String>> implements ConsoleArgument
ConsoleArgument implementations.| Constructor and Description |
|---|
AbstractConsoleArgument() |
AbstractConsoleArgument(int requiredArgs,
String... flags) |
AbstractConsoleArgument(String... flags) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getParam(LinkedList<String> args)
If the next argument is an appropriate parameter to a
ConsoleArgument, retrieves it; otherwise, returns null. |
Class<LinkedList<String>> |
getType()
Gets the type associated with the object.
|
protected boolean |
isFlag(LinkedList<String> args)
Check if the given list of arguments starts with a flag that matches this
ConsoleArgument. |
boolean |
supports(LinkedList<String> args)
Gets whether this object is compatible with the given data object.
|
getInfo, getPriority, setInfo, setPriority, toStringcontext, getContext, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithandlegetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic AbstractConsoleArgument()
public AbstractConsoleArgument(String... flags)
public AbstractConsoleArgument(int requiredArgs,
String... flags)
public boolean supports(LinkedList<String> args)
Typed
By default, this method will return true always, since the type is
known to be compatible. But individual implementations may have other
requirements beyond class assignability.
supports in interface Typed<LinkedList<String>>public Class<LinkedList<String>> getType()
TypedgetType in interface Typed<LinkedList<String>>protected boolean isFlag(LinkedList<String> args)
ConsoleArgument.protected String getParam(LinkedList<String> args)
ConsoleArgument, retrieves it; otherwise, returns null.'-' character; or null otherwise.Copyright © 2009–2016 SciJava. All rights reserved.