Skip to content

Commit 3fff543

Browse files
committed
replace with English javadoc
1 parent 790da22 commit 3fff543

10 files changed

+137
-138
lines changed

src/main/java/org/codelibs/core/timer/TimeoutManager.java

+24-24
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.codelibs.core.log.Logger;
2828

2929
/**
30-
* Timerを扱うクラスです。
30+
* A class that handles timers.
3131
*
3232
* @author higa
3333
*
@@ -37,34 +37,34 @@ public class TimeoutManager implements Runnable {
3737
private static final Logger logger = Logger.getLogger(TimeoutManager.class);
3838

3939
/**
40-
* シングルトンのためのインスタンスです。
40+
* Instance for the singleton.
4141
*/
4242
protected static final TimeoutManager instance = new TimeoutManager();
4343

4444
/**
45-
* Timerのための{@link Thread}です。
45+
* {@link Thread} for the timer.
4646
*/
4747
protected Thread thread;
4848

4949
/**
50-
* {@link TimeoutTask}管理用のリストです。
50+
* A list for managing {@link TimeoutTask}.
5151
*/
5252
protected final SLinkedList<TimeoutTask> timeoutTaskList = new SLinkedList<>();
5353

5454
private TimeoutManager() {
5555
}
5656

5757
/**
58-
* シングルトン用のインスタンスを返します。
58+
* Returns the instance for the singleton.
5959
*
60-
* @return シングルトン用のインスタンス
60+
* @return the instance for the singleton
6161
*/
6262
public static TimeoutManager getInstance() {
6363
return instance;
6464
}
6565

6666
/**
67-
* 処理を開始します。
67+
* Starts the process.
6868
*/
6969
public synchronized void start() {
7070
if (thread == null) {
@@ -78,7 +78,7 @@ public synchronized void start() {
7878
}
7979

8080
/**
81-
* 処理を停止します。
81+
* Stops the process.
8282
*/
8383
public synchronized void stop() {
8484
if (thread != null) {
@@ -91,13 +91,13 @@ public synchronized void stop() {
9191
}
9292

9393
/**
94-
* スレッドに割り込みを行い、終了するまで待機します。
94+
* Interrupts the thread and waits for it to terminate.
9595
*
9696
* @param timeoutMillis
97-
* 待機する時間(ミリ秒単位)
98-
* @return スレッドが終了した場合は<code>true</code>
97+
* The time to wait (in milliseconds)
98+
* @return <code>true</code> if the thread has terminated
9999
* @throws InterruptedException
100-
* 待機中に割り込まれた場合
100+
* If interrupted while waiting
101101
*/
102102
public boolean stop(final long timeoutMillis) throws InterruptedException {
103103
final Thread t = this.thread;
@@ -116,19 +116,19 @@ public boolean stop(final long timeoutMillis) throws InterruptedException {
116116
}
117117

118118
/**
119-
* 管理している {@link TimeoutTask}をクリアします。
119+
* Clears the managed {@link TimeoutTask}.
120120
*/
121121
public synchronized void clear() {
122122
timeoutTaskList.clear();
123123
}
124124

125125
/**
126-
* {@link TimeoutTarget}を追加します。
126+
* Adds a {@link TimeoutTarget}.
127127
*
128-
* @param timeoutTarget target
129-
* @param timeout timeout
130-
* @param permanent permanent
131-
* @return {@link TimeoutTask}
128+
* @param timeoutTarget the target
129+
* @param timeout the timeout duration
130+
* @param permanent whether the task is permanent
131+
* @return the {@link TimeoutTask}
132132
*/
133133
public synchronized TimeoutTask addTimeoutTarget(final TimeoutTarget timeoutTarget, final int timeout, final boolean permanent) {
134134
final TimeoutTask task = new TimeoutTask(timeoutTarget, timeout, permanent);
@@ -138,9 +138,9 @@ public synchronized TimeoutTask addTimeoutTarget(final TimeoutTarget timeoutTarg
138138
}
139139

140140
/**
141-
* 管理している {@link TimeoutTask}の数を返します。
141+
* Returns the number of managed {@link TimeoutTask}.
142142
*
143-
* @return 管理している {@link TimeoutTask}の数
143+
* @return the number of managed {@link TimeoutTask}
144144
*/
145145
public synchronized int getTimeoutTaskCount() {
146146
return timeoutTaskList.size();
@@ -222,9 +222,9 @@ private synchronized boolean isInterrupted() {
222222
}
223223

224224
/**
225-
* 期限の切れた {@link TimeoutTask}のリストを返します。
225+
* Returns the list of expired {@link TimeoutTask}.
226226
*
227-
* @return 期限の切れた {@link TimeoutTask}のリスト
227+
* @return the list of expired {@link TimeoutTask}
228228
*/
229229
protected synchronized List<TimeoutTask> getExpiredTask() {
230230
final List<TimeoutTask> expiredTask = new ArrayList<>();
@@ -246,9 +246,9 @@ protected synchronized List<TimeoutTask> getExpiredTask() {
246246
}
247247

248248
/**
249-
* 管理しているタスクが無いなら処理を停止します。
249+
* Stops the process if there are no managed tasks.
250250
*
251-
* @return 停止したかどうか
251+
* @return whether the process was stopped
252252
*/
253253
protected synchronized boolean stopIfLeisure() {
254254
if (timeoutTaskList.isEmpty()) {

src/main/java/org/codelibs/core/timer/TimeoutTarget.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package org.codelibs.core.timer;
1717

1818
/**
19-
* タイムアウトを処理するインターフェースです。
19+
* This is an interface for handling timeouts.
2020
*
2121
* @author higa
2222
*
@@ -25,7 +25,7 @@
2525
public interface TimeoutTarget {
2626

2727
/**
28-
* タイムアウトの処理を記述します。
28+
* Describes the processing for a timeout.
2929
*/
3030
void expired();
3131
}

src/main/java/org/codelibs/core/timer/TimeoutTask.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.codelibs.core.exception.ClIllegalStateException;
1919

2020
/**
21-
* タイムアウトを管理するクラスです。
21+
* This class manages timeouts.
2222
*
2323
* @author higa
2424
*
@@ -49,50 +49,50 @@ public class TimeoutTask {
4949
}
5050

5151
/**
52-
* 期限切れかどうかを返します。
52+
* Returns whether the task has expired.
5353
*
54-
* @return 期限切れかどうか
54+
* @return whether the task has expired
5555
*/
5656
public boolean isExpired() {
5757
return System.currentTimeMillis() >= startTime + timeoutMillis;
5858
}
5959

6060
/**
61-
* 永続的かどうかを返します。
61+
* Returns whether the task is permanent.
6262
*
63-
* @return 永続的かどうか
63+
* @return whether the task is permanent
6464
*/
6565
public boolean isPermanent() {
6666
return permanent;
6767
}
6868

6969
/**
70-
* キャンセルされているかどうかを返します。
70+
* Returns whether the task has been canceled.
7171
*
72-
* @return キャンセルされているか
72+
* @return whether the task has been canceled
7373
*/
7474
public boolean isCanceled() {
7575
return status == CANCELED;
7676
}
7777

7878
/**
79-
* キャンセルします。
79+
* Cancels the task.
8080
*/
8181
public void cancel() {
8282
status = CANCELED;
8383
}
8484

8585
/**
86-
* 止まっているかどうか返します。
86+
* Returns whether the task is stopped.
8787
*
88-
* @return 止まっているかどうか
88+
* @return whether the task is stopped
8989
*/
9090
public boolean isStopped() {
9191
return status == STOPPED;
9292
}
9393

9494
/**
95-
* タイマーをとめます。
95+
* Stops the timer.
9696
*/
9797
public void stop() {
9898
if (status != ACTIVE) {
@@ -102,7 +102,7 @@ public void stop() {
102102
}
103103

104104
/**
105-
* タイマーを再開始します。
105+
* Restarts the timer.
106106
*/
107107
public void restart() {
108108
status = ACTIVE;

src/main/java/org/codelibs/core/xml/DocumentBuilderFactoryUtil.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.codelibs.core.log.Logger;
2525

2626
/**
27-
* {@link DocumentBuilderFactory}の用のユーティリティクラスです。
27+
* Utility class for {@link DocumentBuilderFactory}.
2828
*
2929
* @author higa
3030
*/
@@ -33,9 +33,9 @@ public abstract class DocumentBuilderFactoryUtil {
3333
private static final Logger logger = Logger.getLogger(DocumentBuilderFactoryUtil.class);
3434

3535
/**
36-
* 新しい {@link DocumentBuilderFactory}のインスタンスを返します。
36+
* Returns a new instance of {@link DocumentBuilderFactory}.
3737
*
38-
* @return 新しい {@link DocumentBuilderFactory}のインスタンス
38+
* @return A new instance of {@link DocumentBuilderFactory}.
3939
*/
4040
public static DocumentBuilderFactory newInstance() {
4141
return newInstance(false);
@@ -62,9 +62,9 @@ public static DocumentBuilderFactory newInstance(final boolean external) {
6262
}
6363

6464
/**
65-
* 新しい {@link DocumentBuilder}を作成します。
65+
* Creates a new {@link DocumentBuilder}.
6666
*
67-
* @return 新しい {@link DocumentBuilder}
67+
* @return A new {@link DocumentBuilder}.
6868
*/
6969
public static DocumentBuilder newDocumentBuilder() {
7070
try {

src/main/java/org/codelibs/core/xml/DocumentBuilderUtil.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828
import org.xml.sax.SAXException;
2929

3030
/**
31-
* {@link DocumentBuilder}用のユーティリティクラスです。
31+
* Utility class for {@link DocumentBuilder}.
3232
*
3333
* @author higa
3434
*/
3535
public abstract class DocumentBuilderUtil {
3636

3737
/**
38-
* XMLを解析します。
38+
* Parses the XML.
3939
*
4040
* @param builder
41-
* {@link DocumentBuilder}{@literal null}であってはいけません
41+
* {@link DocumentBuilder}; must not be {@literal null}.
4242
* @param is
43-
* 入力ストリーム。{@literal null}であってはいけません
43+
* Input stream; must not be {@literal null}.
4444
* @return {@link Document}
4545
*/
4646
public static Document parse(final DocumentBuilder builder, final InputStream is) {

0 commit comments

Comments
 (0)