@Deprecated public class CQCode extends Object implements Map<String,String>, CharSequence, Comparable<CQCode>, Serializable
CQCode封装类从核心1.10.2开始,不再进行权限认证。
KQCode
,
Serialized FormModifier and Type | Class and Description |
---|---|
class |
CQCode.CQCodeEntry
Deprecated.
CQ码对象中使用的Entry对象,覆盖原本的Entry对象并进行参数转义
|
Modifier | Constructor and Description |
---|---|
protected |
CQCode(String typeName,
CQCodeTypes cqCodeTypes,
Map<String,String> params)
Deprecated.
仅子类构造
|
Modifier and Type | Method and Description |
---|---|
String |
addParam(String key,
Object value)
Deprecated.
添加一个参数与值,同
put(String, Object) 方法 |
String |
addParam(String key,
String value)
Deprecated.
添加一个参数与值,同
put(String, String) 方法 |
AppendList |
append(boolean append)
Deprecated.
|
AppendList |
append(boolean append,
CharSequence split)
Deprecated.
|
AppendList |
append(char append)
Deprecated.
|
AppendList |
append(char append,
CharSequence split)
Deprecated.
|
AppendList |
append(CharSequence append)
Deprecated.
拼接一个
CharSequence 实现类,切割符为空格 |
AppendList |
append(CharSequence append,
CharSequence split)
Deprecated.
拼接一个
CharSequence 实现类, 并指定字符串输出的时候的切割符 |
AppendList |
append(double append)
Deprecated.
|
AppendList |
append(double append,
CharSequence split)
Deprecated.
|
AppendList |
append(int append)
Deprecated.
|
AppendList |
append(int append,
CharSequence split)
Deprecated.
|
AppendList |
append(long append)
Deprecated.
|
AppendList |
append(long append,
CharSequence split)
Deprecated.
|
char |
charAt(int index)
Deprecated.
|
void |
clear()
Deprecated.
移除掉所有的参数
|
int |
compareTo(CQCode o)
Deprecated.
|
boolean |
containsKey(Object key)
Deprecated.
是否存在某种key
|
boolean |
containsValue(Object value)
Deprecated.
是否存在某个参数值
此参数值会自动进行转义
|
Set<Map.Entry<String,String>> |
entrySet()
Deprecated.
获取EntrySet集合
|
String |
get(Object key)
Deprecated.
获取某个参数的值
回进行解码
|
CQCodeTypes |
getCQCodeTypes()
Deprecated.
获取CQCode的类型
|
String |
getCQCodeTypesName()
Deprecated.
获取CQCode的类型
|
String |
getParam(String key)
Deprecated.
获取某个参数
同
get(Object) 方法 |
Map<String,String> |
getParams()
Deprecated.
直接获取参数将会无法进行编码转化
|
CQCodeTypes |
getType()
Deprecated.
获取CQCode的类型。
这是一个名字比较短的方法。 |
boolean |
isEmpty()
Deprecated.
判断此CQ码对象的参数是否为空
|
Set<String> |
keySet()
Deprecated.
获取键
|
int |
length()
Deprecated.
|
static CQCode |
of(CQCodeTypes type,
Map<String,String> params)
Deprecated.
工厂方法
|
static CQCode |
of(CQCodeTypes type,
String[] params)
Deprecated.
工厂方法
|
static CQCode |
of(String cqStr)
Deprecated.
工厂方法,直接转化CQ码字符串,如果格式并非CQ码字符串则会直接抛出异常
|
static CQCode |
of(String typeName,
CQCodeTypes type,
Map<String,String> params)
Deprecated.
工厂方法
|
static CQCode |
of(String typeName,
CQCodeTypes type,
String[] params)
Deprecated.
工厂方法
|
static CQCode |
of(String typeStr,
Map<String,String> params)
Deprecated.
工厂方法
|
static CQCode |
of(String typeName,
String[] params)
Deprecated.
工厂方法
|
String |
put(String key,
Object value)
Deprecated.
放入某个参数
|
String |
put(String key,
String value)
Deprecated.
放入某个参数
如果是final参数则抛出异常
v1.4.1 从此之后不再干预finalParam一类的东西了,依靠用户自觉性。
|
void |
putAll(Map<? extends String,? extends String> m)
Deprecated.
添加所有
通过put添加
|
String |
remove(Object key)
Deprecated.
移除掉某个参数
|
void |
setCqCodeTypeName(String typeName)
Deprecated.
设置cq码的参数
|
void |
setCqCodeTypes(CQCodeTypes type)
Deprecated.
|
void |
setType(CQCodeTypes type)
Deprecated.
重新设置CQCode的type
|
int |
size()
Deprecated.
此CQ码参数的数量
|
Stream<Map.Entry<String,String>> |
stream()
Deprecated.
获取Stream
|
CharSequence |
subSequence(int start,
int end)
Deprecated.
|
String |
toString()
Deprecated.
获取CQ码字符串
|
String |
toString(boolean realParam)
Deprecated.
updateToString()方法存在之后此方法意义不大了。
|
void |
updateToString()
Deprecated.
更新toString的值。
假如你变更了params内的值,updateToString会把额外的参数也更新至toString中。
|
Collection<String> |
values()
Deprecated.
获取值集合
自动解码
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
chars, codePoints
protected CQCode(String typeName, CQCodeTypes cqCodeTypes, Map<String,String> params)
public static CQCode of(CQCodeTypes type, String[] params)
type
- 类型params
- 参数数组,格式:[id=12, type=2]public static CQCode of(String typeName, CQCodeTypes type, String[] params)
type
- 类型params
- 参数数组,格式:[id=12, type=2]public static CQCode of(String typeName, String[] params)
typeName
- 类型字符串params
- 参数数组,格式:[id=12, type=2]public static CQCode of(String typeStr, Map<String,String> params)
typeStr
- 类型字符串params
- 参数列表public static CQCode of(CQCodeTypes type, Map<String,String> params)
type
- 类型枚举params
- 参数列表public static CQCode of(String typeName, CQCodeTypes type, Map<String,String> params)
type
- 类型params
- 参数列表public static CQCode of(String cqStr)
cqStr
- cq码字符串public CQCodeTypes getCQCodeTypes()
public String getCQCodeTypesName()
public CQCodeTypes getType()
public void setCqCodeTypes(CQCodeTypes type)
public void setCqCodeTypeName(String typeName)
public void setType(CQCodeTypes type)
type
- public String toString()
toString
in interface CharSequence
toString
in class Object
public void updateToString()
@Deprecated public String toString(boolean realParam)
updateToString()
@Deprecated public Map<String,String> getParams()
getParam(String)
,
addParam(String, Object)
public String getParam(String key)
get(Object)
方法key
- keypublic String addParam(String key, Object value)
put(String, Object)
方法public String addParam(String key, String value)
put(String, String)
方法public Stream<Map.Entry<String,String>> stream()
public AppendList append(CharSequence append)
CharSequence
实现类,切割符为空格append
- 一个CharSequence
实现类public AppendList append(CharSequence append, CharSequence split)
CharSequence
实现类, 并指定字符串输出的时候的切割符append
- 拼接一个CharSequence
实现类public AppendList append(long append)
public AppendList append(int append)
public AppendList append(double append)
public AppendList append(boolean append)
public AppendList append(char append)
public AppendList append(long append, CharSequence split)
public AppendList append(int append, CharSequence split)
public AppendList append(double append, CharSequence split)
public AppendList append(boolean append, CharSequence split)
public AppendList append(char append, CharSequence split)
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map<String,String>
public boolean containsValue(Object value)
containsValue
in interface Map<String,String>
public String put(String key, String value)
public Collection<String> values()
public int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public int compareTo(CQCode o)
compareTo
in interface Comparable<CQCode>
Copyright © 2020. All rights reserved.