Class IndexRangeNegativeFactory
Object
IndexRangeNegativeFactory
Creates
IndexRangeNegative.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic IndexRangeNegativeParses a string to convert it into anIndexRangeNegative.
-
Method Details
-
parse
Parses a string to convert it into anIndexRangeNegative.The string should be in any of the following formats:
start:endsingle_index:endstart:
startis a positive or negative integer indicating the start index of the range (where 0 is the first element).endis a positive or negative integer indicating the end index of the range (inclusive, where either -1 or length(array) - 1 is the last element).single_indeximplies the same value for bothstartandend.
- Parameters:
str- the string to parse- Returns:
- the range extracted from the parsed string
- Throws:
OperationFailedException- if the string does not match any of the patterns above.
-