org.fhcrc.cpl.viewer.commandline.arguments
Class DeltaMassArgumentDefinition

java.lang.Object
  extended by org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
      extended by org.fhcrc.cpl.viewer.commandline.arguments.DeltaMassArgumentDefinition
All Implemented Interfaces:
org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition

public class DeltaMassArgumentDefinition
extends org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
implements org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition

Treats an argument as a Delta Mass -- e.g., 0.1da, 5ppm. Keeps track of both the mass value and the mass type (absolute or PPM)


Nested Class Summary
static class DeltaMassArgumentDefinition.DeltaMassWithType
           
 
Field Summary
protected  int defaultDeltaMassType
           
 
Fields inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
mArgumentHelpText, mArgumentName, mDataType, mDefaultValue, mDisplayName, mIsAdvanced, mRequired
 
Fields inherited from interface org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition
UNNAMED_PARAMETER_VALUE_ARGUMENT, UNNAMED_PARAMETER_VALUE_SERIES_ARGUMENT
 
Constructor Summary
DeltaMassArgumentDefinition(java.lang.String argumentName)
           
 
Method Summary
 DeltaMassArgumentDefinition.DeltaMassWithType convertArgumentValue(java.lang.String argumentValue)
          Try to match the argument against the set of allowed values, either with or without case-sensitivity
 int getDefaultDeltaMassType()
           
 java.lang.String getValueDescriptor()
          Return a String that will be used as a generic example for the value to be used for this argument, in auto-generated usage
 void setDefaultDeltaMassType(int defaultDeltaMassType)
           
 
Methods inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
getArgumentDisplayName, getArgumentName, getDataType, getDefaultValue, getDefaultValueAsString, getDisplayName, getHelpText, hasDefaultValue, isAdvanced, isRequired, setAdvanced, setArgumentDisplayName, setDefaultValue, setDisplayName, setHelpText, setRequired, valueToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition
getArgumentDisplayName, getArgumentName, getDataType, getDefaultValue, getDefaultValueAsString, getHelpText, hasDefaultValue, isAdvanced, isRequired, setAdvanced, setArgumentDisplayName, setDefaultValue, setHelpText, setRequired, valueToString
 

Field Detail

defaultDeltaMassType

protected int defaultDeltaMassType
Constructor Detail

DeltaMassArgumentDefinition

public DeltaMassArgumentDefinition(java.lang.String argumentName)
Method Detail

convertArgumentValue

public DeltaMassArgumentDefinition.DeltaMassWithType convertArgumentValue(java.lang.String argumentValue)
                                                                   throws org.fhcrc.cpl.toolbox.commandline.arguments.ArgumentValidationException
Try to match the argument against the set of allowed values, either with or without case-sensitivity

Specified by:
convertArgumentValue in interface org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition
Specified by:
convertArgumentValue in class org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
Parameters:
argumentValue -
Returns:
the argument as a String
Throws:
org.fhcrc.cpl.toolbox.commandline.arguments.ArgumentValidationException - if the argument doesn't validate

getValueDescriptor

public java.lang.String getValueDescriptor()
Description copied from interface: org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition
Return a String that will be used as a generic example for the value to be used for this argument, in auto-generated usage

Specified by:
getValueDescriptor in interface org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition
Overrides:
getValueDescriptor in class org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
Returns:

getDefaultDeltaMassType

public int getDefaultDeltaMassType()

setDefaultDeltaMassType

public void setDefaultDeltaMassType(int defaultDeltaMassType)


Fred Hutchinson Cancer Research Center