git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more test for isDuplication() and isSpecation() added (phyloXML encoded
[jalview.git]
/
forester
/
java
/
src
/
org
/
forester
/
util
/
CommandLineArguments.java
diff --git
a/forester/java/src/org/forester/util/CommandLineArguments.java
b/forester/java/src/org/forester/util/CommandLineArguments.java
index
91f11bd
..
f75eb69
100644
(file)
--- a/
forester/java/src/org/forester/util/CommandLineArguments.java
+++ b/
forester/java/src/org/forester/util/CommandLineArguments.java
@@
-21,7
+21,7
@@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
//
// Contact: phylosoft @ gmail . com
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
//
// Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
package org.forester.util;
package org.forester.util;
@@
-93,7
+93,7
@@
public final class CommandLineArguments {
if ( o.containsKey( option_name ) ) {
final String value = o.get( option_name );
if ( !ForesterUtil.isEmpty( value ) ) {
if ( o.containsKey( option_name ) ) {
final String value = o.get( option_name );
if ( !ForesterUtil.isEmpty( value ) ) {
- return value;
+ return value.replaceAll( "\\s+", " " ).trim();
}
else {
throw new IllegalArgumentException( "value for \"" + option_name + "\" is not set" );
}
else {
throw new IllegalArgumentException( "value for \"" + option_name + "\" is not set" );
@@
-106,12
+106,16
@@
public final class CommandLineArguments {
/**
* Removes quotes
/**
* Removes quotes
- *
+ *
*/
public String getOptionValueAsCleanString( final String option_name ) throws IllegalArgumentException {
return getOptionValue( option_name ).replaceAll( "\"", "" ).replaceAll( "\'", "" );
}
*/
public String getOptionValueAsCleanString( final String option_name ) throws IllegalArgumentException {
return getOptionValue( option_name ).replaceAll( "\"", "" ).replaceAll( "\'", "" );
}
+ public char getOptionValueAsChar( final String option_name ) throws IllegalArgumentException {
+ return getOptionValue( option_name ).charAt( 0 );
+ }
+
public double getOptionValueAsDouble( final String option_name ) throws IOException {
double d = -Double.MAX_VALUE;
try {
public double getOptionValueAsDouble( final String option_name ) throws IOException {
double d = -Double.MAX_VALUE;
try {
@@
-220,7
+224,7
@@
public final class CommandLineArguments {
// }
if ( getAllOptions().containsKey( key ) ) {
throw new IllegalArgumentException( "attempt to set option \"" + key + "\" mutiple times [" + option
// }
if ( getAllOptions().containsKey( key ) ) {
throw new IllegalArgumentException( "attempt to set option \"" + key + "\" mutiple times [" + option
- + "]" );
+ + "]" );
}
options_map.put( key, value );
}
}
options_map.put( key, value );
}