Returns a splitter that behaves equivalently to this splitter but stops splitting after it reaches the limit. The limit defines the maximum number of items returned by the iterator, or the maximum size of the list returned by #splitToList. For example, {@code Splitter.on(',').lim
(int limit)
| 342 | |
| 343 | |
| 344 | public Splitter limit(int limit) { |
| 345 | checkArgument(limit > 0, "must be greater than zero: %s", limit); |
| 346 | return new Splitter(strategy, omitEmptyStrings, trimmer, limit); |
| 347 | } |
| 348 | |
| 349 | /** |
| 350 | * Returns a splitter that behaves equivalently to {@code this} splitter, but automatically |
no test coverage detected