Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jlab.utils.options;

import java.util.HexFormat;
import java.util.List;

/**
Expand Down Expand Up @@ -28,9 +29,13 @@ public OptionValue() { }
public String getDefault() { return this.optionDefault;}

public int intValue() { return Integer.parseInt(this.optionValue);}
public long longValue() { return Long.parseLong(this.optionValue);}
public double doubleValue() { return Double.parseDouble(this.optionValue);}
public String stringValue() { return this.optionValue;}
public long longValue() {
if (this.optionValue.startsWith("0x"))
return HexFormat.fromHexDigitsToLong(this.optionValue.substring(2));
return Long.parseLong(this.optionValue);
}

private int getOptionIndex(List<String> options){
for(int i = 0; i < options.size(); i++){
Expand Down
Loading