public class SplitIter extends ComputeIter<String> implements Serializable
Constructor and Description |
---|
SplitIter(CharSequence text,
TextFinder separatorFinder,
int limit,
boolean ignoreEmpty)
构造
|
Modifier and Type | Method and Description |
---|---|
protected String |
computeNext()
|
void |
reset()
重置
|
String[] |
toArray(boolean trim)
获取切分后的对象数组
|
List<String> |
toList(boolean trim)
获取切分后的对象列表
|
<T> List<T> |
toList(Function<String,T> mapping)
获取切分后的对象列表
|
finish, hasNext, next
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
public SplitIter(CharSequence text, TextFinder separatorFinder, int limit, boolean ignoreEmpty)
text
- 文本,不能为null
separatorFinder
- 分隔符匹配器limit
- 限制数量,小于等于0表示无限制ignoreEmpty
- 是否忽略""protected String computeNext()
ComputeIter
computeNext
in class ComputeIter<String>
public void reset()
public String[] toArray(boolean trim)
trim
- 是否去除元素两边空格public List<String> toList(boolean trim)
trim
- 是否去除元素两边空格Copyright © 2024. All rights reserved.