public class Model extends Object
Constructor and Description |
---|
Model()
Creates a model.
|
public List<Integer> toList(String elements)
List<Integer> t = m.toList("5 9 3 1 4 2 6 8 7");
System.out.println(t);
would print:
[5, 9, 3, 1, 4, 2, 6, 8, 7]
elements
- a string containing integers separated by spaceselements
;
the empty list is returned if the string contains no integer
surrounded by spaces