public class IntegerRange extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IntegerRange.VariableSource |
Constructor and Description |
---|
IntegerRange()
Creates a new instance with a null value
|
IntegerRange(IntegerRange other)
Creates a copy
|
IntegerRange(String value)
Creates a new instance and initializes it
|
Modifier and Type | Method and Description |
---|---|
DefaultExpressionParameter |
getExpression() |
List<Integer> |
getIntegers(int min,
int max,
ExpressionVariables variables)
Generates the list of integers based on the value
|
static List<Integer> |
getIntegersFromRangeString(String value)
Converts a range string of format [range];[range];... to a list of integers
|
String |
getValue() |
boolean |
isUseExpression() |
void |
setExpression(DefaultExpressionParameter expression) |
void |
setUseExpression(boolean useExpression) |
void |
setValue(String value) |
String |
toString() |
List<Integer> |
tryGetIntegers(int min,
int max,
ExpressionVariables variables)
Generates the list of integers based on the value.
|
public IntegerRange()
public IntegerRange(String value)
value
- the valuepublic IntegerRange(IntegerRange other)
other
- the originalpublic static List<Integer> getIntegersFromRangeString(String value)
value
- the range stringpublic boolean isUseExpression()
public void setUseExpression(boolean useExpression)
public DefaultExpressionParameter getExpression()
public void setExpression(DefaultExpressionParameter expression)
public String getValue()
public void setValue(String value)
public List<Integer> tryGetIntegers(int min, int max, ExpressionVariables variables)
min
- the min value the integers can havemax
- the max value the integers can havevariables
- the variables for the expression-based variantpublic List<Integer> getIntegers(int min, int max, ExpressionVariables variables) throws NumberFormatException
min
- the min value the integers can havemax
- the max value the integers can havevariables
- the variables for the expression-based variantNumberFormatException
- if the format is wrongCopyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.