public class NestedStringToken extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
(专用程序包) LinkedList<Object> |
defaultValue |
默认值
|
(专用程序包) int |
endIndex |
在原始字符串中的结束位置
|
(专用程序包) boolean |
isClosed |
是否
${} 封闭 |
(专用程序包) LinkedList<Object> |
key |
变量名 variable name
|
(专用程序包) NestedStringToken |
parentNode |
父节点
|
(专用程序包) int |
startIndex |
在原始字符串中的开始位置
|
(专用程序包) LinkedList<Object> |
tokens |
${} 中的字符串 |
| 构造器 | 说明 |
|---|---|
NestedStringToken() |
|
NestedStringToken(int startIndex) |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addToken(NestedStringToken token) |
添加token
|
void |
addToken(String token) |
添加token
|
void |
addTokens(LinkedList<Object> tokens) |
批量添加token
|
LinkedList<Object> |
getDefaultValue() |
|
int |
getEndIndex() |
|
private static int |
getIndexOfDefaultValue(LinkedList<Object> newTokens,
int indexOfDefaultValue,
StringBuilder sb) |
|
LinkedList<Object> |
getKey() |
|
NestedStringToken |
getParentNode() |
|
int |
getStartIndex() |
|
LinkedList<Object> |
getTokens() |
|
boolean |
isClosed() |
|
void |
mergeAndSplitTokens() |
合并连续的字符串token,并将token分别存储在
key 与 defaultValue 中 |
void |
removeToken(NestedStringToken token) |
移除token
|
void |
setClosed(boolean closed) |
|
void |
setEndIndex(int endIndex) |
|
void |
setParentNode(NestedStringToken parentNode) |
|
void |
setStartIndex(int startIndex) |
|
static StringBuilder |
tokensToString(List<Object> tokens) |
|
String |
toString() |
transient NestedStringToken parentNode
final LinkedList<Object> tokens
${} 中的字符串final transient LinkedList<Object> key
final transient LinkedList<Object> defaultValue
int startIndex
int endIndex
boolean isClosed
${} 封闭public NestedStringToken()
public NestedStringToken(int startIndex)
public NestedStringToken getParentNode()
public void setParentNode(NestedStringToken parentNode)
public LinkedList<Object> getTokens()
public LinkedList<Object> getKey()
public LinkedList<Object> getDefaultValue()
public int getStartIndex()
public void setStartIndex(int startIndex)
public int getEndIndex()
public void setEndIndex(int endIndex)
public boolean isClosed()
public void setClosed(boolean closed)
public void addToken(String token)
token - tokenpublic void addToken(NestedStringToken token)
token - tokenpublic void addTokens(LinkedList<Object> tokens)
tokens - tokenspublic void removeToken(NestedStringToken token)
token - tokenpublic void mergeAndSplitTokens()
key 与 defaultValue 中private static int getIndexOfDefaultValue(LinkedList<Object> newTokens, int indexOfDefaultValue, StringBuilder sb)
public static StringBuilder tokensToString(List<Object> tokens)
Copyright © 2023 io-fairy. All rights reserved.