forked from hellokaton/write-readable-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample2.java
More file actions
52 lines (41 loc) · 981 Bytes
/
Copy pathExample2.java
File metadata and controls
52 lines (41 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package chapter_06;
/**
* 不用为了注释而注释
* 不要给不好的名字加注释——应该把名字改好
*
* @author biezhi
* @date 2018/7/6
*/
public class Example2 {
static class Node {
String name;
}
/**
* 查找具有给定名称的节点或者返回一个null
*
* 1. 如果深度 <= 0, 只检查子树
* 2. 如果深度 == N, 只检查子树和 N 级以下
*/
Node findNodeInSubTree(Node subTree, String name, int depth) {
return null;
}
/**
* 对请求中的回复状态做限制
* <p>
* 例如返回的项目数或总字节大小等。
*/
void cleanReply(String request, String reply) {
}
/**
* 对请求做一个限制,确保回复状态符合 “次数/字节” 等等
* @param request
* @param reply
*/
void enforceLimitsForRequest(String request, String reply){
}
/**
* 释放本地的 registryKey,不会修改注册中心的实际数据
*/
void releaseRegistry(String registryKey) {
}
}