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, nextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removepublic SplitIter(CharSequence text, TextFinder separatorFinder, int limit, boolean ignoreEmpty)
text - 文本,不能为nullseparatorFinder - 分隔符匹配器limit - 限制数量,小于等于0表示无限制ignoreEmpty - 是否忽略""protected String computeNext()
ComputeItercomputeNext in class ComputeIter<String>public void reset()
public String[] toArray(boolean trim)
trim - 是否去除元素两边空格public List<String> toList(boolean trim)
trim - 是否去除元素两边空格Copyright © 2025. All rights reserved.