Skip to content

Commit 98e2126

Browse files
committed
fix javadoc error
1 parent bfae120 commit 98e2126

File tree

2 files changed

+21
-34
lines changed

2 files changed

+21
-34
lines changed

src/main/java/com/github/myibu/algorithm/filter/doublearray/AhoCorasickDoubleArrayTrie.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,9 @@ private void storeEmits(int position, int currentState, List<Hit<V>> collectedEm
436436
/**
437437
* transition of a state
438438
*
439-
* @param current
440-
* @param c
441-
* @return
439+
* @param current current
440+
* @param c c
441+
* @return int
442442
*/
443443
protected int transition(int current, char c)
444444
{
@@ -458,9 +458,9 @@ protected int transition(int current, char c)
458458
/**
459459
* transition of a state, if the state is root and it failed, then returns the root
460460
*
461-
* @param nodePos
462-
* @param c
463-
* @return
461+
* @param nodePos nodePos
462+
* @param c c
463+
* @return int
464464
*/
465465
protected int transitionWithRoot(int nodePos, char c)
466466
{

src/main/java/com/github/myibu/algorithm/filter/doublearray/State.java

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,6 @@
2323
import java.util.*;
2424

2525
/**
26-
* <p>
27-
* 一个状态有如下几个功能
28-
* </p>
29-
* <p/>
30-
* <ul>
31-
* <li>success; 成功转移到另一个状态</li>
32-
* <li>failure; 不可顺着字符串跳转的话,则跳转到一个浅一点的节点</li>
33-
* <li>emits; 命中一个模式串</li>
34-
* </ul>
35-
* <p/>
36-
* <p>
37-
* 根节点稍有不同,根节点没有 failure 功能,它的“failure”指的是按照字符串路径转移到下一个状态。其他节点则都有failure状态。
38-
* </p>
39-
*
4026
* @author Robert Bor
4127
*/
4228
public class State
@@ -77,7 +63,7 @@ public State()
7763
/**
7864
* 构造深度为depth的节点
7965
*
80-
* @param depth
66+
* @param depth depth
8167
*/
8268
public State(int depth)
8369
{
@@ -87,7 +73,7 @@ public State(int depth)
8773
/**
8874
* 获取节点深度
8975
*
90-
* @return
76+
* @return depth
9177
*/
9278
public int getDepth()
9379
{
@@ -97,7 +83,7 @@ public int getDepth()
9783
/**
9884
* 添加一个匹配到的模式串(这个状态对应着这个模式串)
9985
*
100-
* @param keyword
86+
* @param keyword keyword
10187
*/
10288
public void addEmit(int keyword)
10389
{
@@ -111,7 +97,7 @@ public void addEmit(int keyword)
11197
/**
11298
* 获取最大的值
11399
*
114-
* @return
100+
* @return Integer
115101
*/
116102
public Integer getLargestValueId()
117103
{
@@ -123,7 +109,7 @@ public Integer getLargestValueId()
123109
/**
124110
* 添加一些匹配到的模式串
125111
*
126-
* @param emits
112+
* @param emits emits
127113
*/
128114
public void addEmit(Collection<Integer> emits)
129115
{
@@ -136,7 +122,7 @@ public void addEmit(Collection<Integer> emits)
136122
/**
137123
* 获取这个节点代表的模式串(们)
138124
*
139-
* @return
125+
* @return Integer
140126
*/
141127
public Collection<Integer> emit()
142128
{
@@ -146,7 +132,7 @@ public Collection<Integer> emit()
146132
/**
147133
* 是否是终止状态
148134
*
149-
* @return
135+
* @return boolean
150136
*/
151137
public boolean isAcceptable()
152138
{
@@ -156,7 +142,7 @@ public boolean isAcceptable()
156142
/**
157143
* 获取failure状态
158144
*
159-
* @return
145+
* @return State
160146
*/
161147
public State failure()
162148
{
@@ -166,7 +152,8 @@ public State failure()
166152
/**
167153
* 设置failure状态
168154
*
169-
* @param failState
155+
* @param failState failState
156+
* @param fail fail
170157
*/
171158
public void setFailure(State failState, int fail[])
172159
{
@@ -194,8 +181,8 @@ private State nextState(Character character, boolean ignoreRootState)
194181
/**
195182
* 按照character转移,根节点转移失败会返回自己(永远不会返回null)
196183
*
197-
* @param character
198-
* @return
184+
* @param character character
185+
* @return State
199186
*/
200187
public State nextState(Character character)
201188
{
@@ -205,8 +192,8 @@ public State nextState(Character character)
205192
/**
206193
* 按照character转移,任何节点转移失败会返回null
207194
*
208-
* @param character
209-
* @return
195+
* @param character character
196+
* @return State
210197
*/
211198
public State nextStateIgnoreRootState(Character character)
212199
{
@@ -251,7 +238,7 @@ public String toString()
251238
/**
252239
* 获取goto表
253240
*
254-
* @return
241+
* @return Map
255242
*/
256243
public Map<Character, State> getSuccess()
257244
{

0 commit comments

Comments
 (0)