|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.util.StringListParser
public class StringListParser
This utility class can be used to parse range expressions. In particular,
it is used by RangeSimulator
to express ranges for
configuration properties.
The language for range expression is the following:
[rangelist] := [range] | [range],[rangelist] [range] := value | min:max | min:max|step | min:max*|stepwhere value, min, max and step are numeric atoms that defines ranges.
For example, the following range expression:
5,9:11,13:17|2,32:128*|2corresponds to 5 (single value), 9-10-11 (range between 9 and 11, default increment 1), 13-15-17 (range between 13 and 17, specified step 2, 32-64-128 (range between 32 and 128, multiplicative step 2).
Method Summary | |
---|---|
static java.lang.String[] |
parseList(java.lang.String s)
Parse the specified string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String[] parseList(java.lang.String s)
s
- the string to be parsed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |