This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-net.git
commit 2236967c02172ccbc4e78a2cf51023c44c1bbfc0 Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Wed Feb 12 14:07:00 2025 -0500 Fix Javadoc warnings --- .../java/org/apache/commons/net/SocketClient.java | 2 + .../commons/net/discard/DiscardUDPClient.java | 3 + .../org/apache/commons/net/ftp/Configurable.java | 4 +- src/main/java/org/apache/commons/net/ftp/FTP.java | 50 +++++++++---- .../java/org/apache/commons/net/ftp/FTPClient.java | 30 +++++--- .../apache/commons/net/ftp/FTPClientConfig.java | 25 ++++--- .../java/org/apache/commons/net/ftp/FTPCmd.java | 84 +++++++++++----------- .../net/ftp/parser/CompositeFileEntryParser.java | 5 ++ .../parser/DefaultFTPFileEntryParserFactory.java | 35 +++++++++ .../net/ftp/parser/FTPTimestampParserImpl.java | 10 +++ .../java/org/apache/commons/net/nntp/Article.java | 14 ++++ .../org/apache/commons/net/nntp/ArticleInfo.java | 10 +++ .../org/apache/commons/net/nntp/Threadable.java | 39 +++++++++- .../org/apache/commons/net/util/ListenerList.java | 1 + 14 files changed, 235 insertions(+), 77 deletions(-) diff --git a/src/main/java/org/apache/commons/net/SocketClient.java b/src/main/java/org/apache/commons/net/SocketClient.java index 28b32c65..b403019c 100644 --- a/src/main/java/org/apache/commons/net/SocketClient.java +++ b/src/main/java/org/apache/commons/net/SocketClient.java @@ -470,6 +470,8 @@ public abstract class SocketClient { } /** + * Gets the address to which the socket is connected. + * * @return The remote address to which the client is connected. Delegates to {@link Socket#getInetAddress()} * @throws NullPointerException if the socket is not currently open */ diff --git a/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java b/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java index 2dc18260..bf575ada 100644 --- a/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java +++ b/src/main/java/org/apache/commons/net/discard/DiscardUDPClient.java @@ -38,6 +38,9 @@ public class DiscardUDPClient extends DatagramSocketClient { private final DatagramPacket sendPacket; + /** + * Constructs a new instance. + */ public DiscardUDPClient() { sendPacket = new DatagramPacket(NetConstants.EMPTY_BTYE_ARRAY, 0); } diff --git a/src/main/java/org/apache/commons/net/ftp/Configurable.java b/src/main/java/org/apache/commons/net/ftp/Configurable.java index 88e78553..f4679cbe 100644 --- a/src/main/java/org/apache/commons/net/ftp/Configurable.java +++ b/src/main/java/org/apache/commons/net/ftp/Configurable.java @@ -23,7 +23,9 @@ package org.apache.commons.net.ftp; public interface Configurable { /** - * @param config the object containing the configuration data + * Configures this instance using an FTPClientConfig. + * + * @param config the object containing the configuration data. * @throws IllegalArgumentException if the elements of the {@code config} are somehow inadequate to configure the Configurable object. */ void configure(FTPClientConfig config); diff --git a/src/main/java/org/apache/commons/net/ftp/FTP.java b/src/main/java/org/apache/commons/net/ftp/FTP.java index 42004193..d49534a5 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTP.java +++ b/src/main/java/org/apache/commons/net/ftp/FTP.java @@ -183,10 +183,30 @@ public class FTP extends SocketClient { public static final int REPLY_CODE_LEN = 3; private static final String MODES = "AEILNTCFRPSBCZ"; + + /** + * The last FTP reply code. + */ protected int _replyCode; + + /** + * The lines of text from the last FTP server response. + */ protected ArrayList<String> _replyLines; + + /** + * Whether we've processed the last reply lines. + */ protected boolean _newReplyString; + + /** + * The text from the last FTP server response. + */ protected String _replyString; + + /** + * The character encoding to be used by the FTP control connection. + */ protected String _controlEncoding; /** @@ -479,8 +499,9 @@ public class FTP extends SocketClient { /** * A convenience method to send the FTP EPRT command to the server, receive the reply, and return the reply code. - * + * <p> * Examples: + * </p> * <ul> * <li>EPRT |1|132.235.1.2|6275|</li> * <li>EPRT |2|1080::8:800:200C:417A|5282|</li> @@ -551,7 +572,7 @@ public class FTP extends SocketClient { } /** - * Provide command support to super-class + * Gets protocol command support. */ @Override protected ProtocolCommandSupport getCommandSupport() { @@ -559,6 +580,8 @@ public class FTP extends SocketClient { } /** + * Gets the character encoding used to communicate over the control connection. + * * @return The character encoding used to communicate over the control connection. */ public String getControlEncoding() { @@ -566,7 +589,7 @@ public class FTP extends SocketClient { } /** - * Fetches a reply from the FTP server and returns the integer reply code. After calling this method, the actual reply text can be accessed from either + * Gets a reply from the FTP server and returns the integer reply code. After calling this method, the actual reply text can be accessed from either * calling {@link #getReplyString getReplyString } or {@link #getReplyStrings getReplyStrings }. Only use this method if you are implementing your own FTP * client or if you need to fetch a secondary response from the FTP server. * @@ -651,7 +674,7 @@ public class FTP extends SocketClient { } /** - * Returns the integer value of the reply code of the last FTP reply. You will usually only use this method after you connect to the FTP server to check + * Gets the integer value of the reply code of the last FTP reply. You will usually only use this method after you connect to the FTP server to check * that the connection was successful since {@code connect} is of type void. * * @return The integer value of the reply code of the last FTP reply. @@ -661,7 +684,7 @@ public class FTP extends SocketClient { } /** - * Returns the entire text of the last FTP server response exactly as it was received, including all end of line markers in NETASCII format. + * Gets the entire text of the last FTP server response exactly as it was received, including all end of line markers in NETASCII format. * * @return The entire text from the last FTP response as a String. */ @@ -679,7 +702,7 @@ public class FTP extends SocketClient { } /** - * Returns the nth line of text from the last FTP server response as a string. The end of line markers of each are stripped from the line. + * Gets the nth line of text from the last FTP server response as a string. The end of line markers of each are stripped from the line. * * @param index The index of the line to return, 0-based. * @return The lines of text from the last FTP response as an array. @@ -689,7 +712,7 @@ public class FTP extends SocketClient { } /** - * Returns the lines of text from the last FTP server response as an array of strings, one entry per line. The end of line markers of each are stripped from + * Gets the lines of text from the last FTP server response as an array of strings, one entry per line. The end of line markers of each are stripped from * each line. * * @return The lines of text from the last FTP response as an array. @@ -738,8 +761,9 @@ public class FTP extends SocketClient { /** * Return whether strict non-multiline parsing is enabled, as per RFC 959, section 4.2. * <p> - * The default is true, which requires the 3-digit code be followed by space and some text. <br> - * If false, only the 3-digit code is required (as was the case for versions up to 3.5) <br> + * The default is true, which requires the 3-digit code be followed by space and some text. + * If false, only the 3-digit code is required (as was the case for versions up to 3.5). + * </p> * * @return True if strict (default), false if additional checks are not made * @since 3.6 @@ -1250,7 +1274,7 @@ public class FTP extends SocketClient { * UTF-8 so that file names with multi-byte character representations (e.g, Big 8) can be specified. * <p> * Please note that this has to be set before the connection is established. - * + * </p> * @param encoding The new character encoding for the control connection. */ public void setControlEncoding(final String encoding) { @@ -1270,10 +1294,12 @@ public class FTP extends SocketClient { /** * Sets strict non-multiline parsing. * <p> - * If true, it requires the 3-digit code be followed by space and some text. <br> - * If false, only the 3-digit code is required (as was the case for versions up to 3.5) + * If true, it requires the 3-digit code be followed by space and some text. + * If false, only the 3-digit code is required (as was the case for versions up to 3.5). + * </p> * <p> * <strong>This should not be required by a well-behaved FTP server</strong> <br> + * </p> * * @param strictReplyParsing the setting * @since 3.6 diff --git a/src/main/java/org/apache/commons/net/ftp/FTPClient.java b/src/main/java/org/apache/commons/net/ftp/FTPClient.java index 78c4796e..6931e8e8 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPClient.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPClient.java @@ -886,6 +886,8 @@ public class FTPClient extends FTP implements Configurable { } /** + * Retrieves data to an output stream for the given command. + * * @param command the command to get * @param remote the remote file name * @param local The local OutputStream to which to write the file. @@ -928,6 +930,8 @@ public class FTPClient extends FTP implements Configurable { } /** + * Retrieves data in an input stream for the given command. + * * @param command the command to send * @param remote the remote file name * @return the stream from which to read the file @@ -956,6 +960,8 @@ public class FTPClient extends FTP implements Configurable { } /** + * Stores the given stream. + * * @since 3.1 * @param command the command to send * @param remote the remote file name @@ -997,9 +1003,11 @@ public class FTPClient extends FTP implements Configurable { } /** + * Gets the the output stream. + * * @param command the command to send * @param remote the remote file name - * @return the output stream to write to + * @return the output stream. * @throws IOException on error * @since 3.1 */ @@ -1633,26 +1641,30 @@ public class FTPClient extends FTP implements Configurable { } /** - * @param pathname the initial pathname - * @return the adjusted string with "-a" added if necessary + * Gets the adjusted string with "-a" added if necessary. + * + * @param pathName the initial pathname + * @return the adjusted string with "-a" added if necessary. * @since 2.0 */ - protected String getListArguments(final String pathname) { + protected String getListArguments(final String pathName) { if (getListHiddenFiles()) { - if (pathname != null) { - final StringBuilder sb = new StringBuilder(pathname.length() + 3); + if (pathName != null) { + final StringBuilder sb = new StringBuilder(pathName.length() + 3); sb.append("-a "); - sb.append(pathname); + sb.append(pathName); return sb.toString(); } return "-a"; } - return pathname; + return pathName; } /** + * Gets whether to list hidden files. + * * @see #setListHiddenFiles(boolean) - * @return the current state + * @return whether to list hidden files. * @since 2.0 */ public boolean getListHiddenFiles() { diff --git a/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java b/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java index 4aa1f9a8..c3723c6c 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java @@ -400,7 +400,7 @@ public class FTPClientConfig { } /** - * getter for the {@link #setDefaultDateFormatStr(String) defaultDateFormatStr} property. + * Gets the {@link #setDefaultDateFormatStr(String) defaultDateFormatStr} property. * * @return the defaultDateFormatStr property. */ @@ -409,7 +409,7 @@ public class FTPClientConfig { } /** - * getter for the {@link #setRecentDateFormatStr(String) recentDateFormatStr} property. + * Gets the {@link #setRecentDateFormatStr(String) recentDateFormatStr} property. * * @return the recentDateFormatStr property. */ @@ -419,9 +419,7 @@ public class FTPClientConfig { } /** - * <p> - * getter for the {@link #setServerLanguageCode(String) serverLanguageCode} property. - * </p> + * Gets the {@link #setServerLanguageCode(String) serverLanguageCode} property. * * @return the serverLanguageCode property. */ @@ -430,7 +428,7 @@ public class FTPClientConfig { } /** - * Getter for the serverSystemKey property. This property specifies the general type of server to which the client connects. Should be either one of the + * Gets the serverSystemKey property. This property specifies the general type of server to which the client connects. Should be either one of the * {@code FTPClientConfig.SYST_*} codes or else the fully qualified class name of a parser implementing both the {@code FTPFileEntryParser} and * {@code Configurable} interfaces. * @@ -441,7 +439,7 @@ public class FTPClientConfig { } /** - * getter for the {@link #setServerTimeZoneId(String) serverTimeZoneId} property. + * Gets the {@link #setServerTimeZoneId(String) serverTimeZoneId} property. * * @return the serverTimeZoneId property. */ @@ -450,9 +448,7 @@ public class FTPClientConfig { } /** - * <p> - * getter for the {@link #setShortMonthNames(String) shortMonthNames} property. - * </p> + * Gets the {@link #setShortMonthNames(String) shortMonthNames} property. * * @return the shortMonthNames. */ @@ -461,10 +457,13 @@ public class FTPClientConfig { } /** + * Gets whether parsing a list should return FTPFile entries even for unparseable response lines + * <p> + * If true, the FTPFile for any unparseable entries will contain only the unparsed entry {@link FTPFile#getRawListing()} and {@link FTPFile#isValid()} will + * return {@code false} + * </p> + * * @return true if list parsing should return FTPFile entries even for unparseable response lines - * <p> - * If true, the FTPFile for any unparseable entries will contain only the unparsed entry {@link FTPFile#getRawListing()} and - * {@link FTPFile#isValid()} will return {@code false} * @since 3.4 */ public boolean getUnparseableEntries() { diff --git a/src/main/java/org/apache/commons/net/ftp/FTPCmd.java b/src/main/java/org/apache/commons/net/ftp/FTPCmd.java index 884c4cc6..8979faec 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPCmd.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPCmd.java @@ -18,135 +18,137 @@ package org.apache.commons.net.ftp; /** + * Enumerates FTP commands. + * * @since 3.3 */ public enum FTPCmd { - /** FTP command. */ + /** FTP command ABOR. */ ABOR, - /** FTP command. */ + /** FTP command ACCT. */ ACCT, - /** FTP command. */ + /** FTP command ALLO. */ ALLO, - /** FTP command. */ + /** FTP command APPE. */ APPE, - /** FTP command. */ + /** FTP command CDUP. */ CDUP, - /** FTP command. */ + /** FTP command CWD. */ CWD, - /** FTP command. */ + /** FTP command DELE. */ DELE, - /** FTP command. */ + /** FTP command EPRT. */ EPRT, - /** FTP command. */ + /** FTP command EPSV. */ EPSV, - /** FTP command. */ + /** FTP command FEAT. */ FEAT, - /** FTP command. */ + /** FTP command HELP. */ HELP, - /** FTP command. */ + /** FTP command LIST. */ LIST, - /** FTP command. */ + /** FTP command MDTM. */ MDTM, - /** FTP command. */ + /** FTP command MFMT. */ MFMT, - /** FTP command. */ + /** FTP command MKD. */ MKD, - /** FTP command. */ + /** FTP command MLSD. */ MLSD, - /** FTP command. */ + /** FTP command MLST. */ MLST, - /** FTP command. */ + /** FTP command MODE. */ MODE, - /** FTP command. */ + /** FTP command NLST. */ NLST, - /** FTP command. */ + /** FTP command NOOP. */ NOOP, - /** FTP command. */ + /** FTP command PASS. */ PASS, - /** FTP command. */ + /** FTP command PASV. */ PASV, - /** FTP command. */ + /** FTP command PORT. */ PORT, - /** FTP command. */ + /** FTP command PWD. */ PWD, - /** FTP command. */ + /** FTP command QUIT. */ QUIT, - /** FTP command. */ + /** FTP command REIN. */ REIN, - /** FTP command. */ + /** FTP command REST. */ REST, - /** FTP command. */ + /** FTP command RETR. */ RETR, - /** FTP command. */ + /** FTP command RMD. */ RMD, - /** FTP command. */ + /** FTP command RNFR. */ RNFR, - /** FTP command. */ + /** FTP command RNTO. */ RNTO, - /** FTP command. */ + /** FTP command SITE. */ SITE, /** - * FTP command. + * FTP command SIZE. * * @since 3.7 */ SIZE, - /** FTP command. */ + /** FTP command SMNT. */ SMNT, - /** FTP command. */ + /** FTP command STAT. */ STAT, - /** FTP command. */ + /** FTP command STOR. */ STOR, - /** FTP command. */ + /** FTP command STOU. */ STOU, - /** FTP command. */ + /** FTP command STRU. */ STRU, - /** FTP command. */ + /** FTP command SYST. */ SYST, - /** FTP command. */ + /** FTP command TYPE. */ TYPE, - /** FTP command. */ + /** FTP command USER. */ USER; // Aliases diff --git a/src/main/java/org/apache/commons/net/ftp/parser/CompositeFileEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/CompositeFileEntryParser.java index be7368a5..6bf6c76f 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/CompositeFileEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/CompositeFileEntryParser.java @@ -29,6 +29,11 @@ public class CompositeFileEntryParser extends FTPFileEntryParserImpl { private final FTPFileEntryParser[] ftpFileEntryParsers; private FTPFileEntryParser cachedFtpFileEntryParser; + /** + * Constructs a new instance. + * + * @param ftpFileEntryParsers An array of FTPFileEntryParser. + */ public CompositeFileEntryParser(final FTPFileEntryParser[] ftpFileEntryParsers) { this.cachedFtpFileEntryParser = null; this.ftpFileEntryParsers = ftpFileEntryParsers; diff --git a/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java b/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java index fda98ec2..9226bdb2 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java @@ -164,14 +164,29 @@ public class DefaultFTPFileEntryParserFactory implements FTPFileEntryParserFacto return parser; } + /** + * Creates a new MVSFTPEntryParser. + * + * @return a new MVSFTPEntryParser. + */ public FTPFileEntryParser createMVSEntryParser() { return new MVSFTPEntryParser(); } + /** + * Creates a new NetwareFTPEntryParser. + * + * @return a new NetwareFTPEntryParser. + */ public FTPFileEntryParser createNetwareFTPEntryParser() { return new NetwareFTPEntryParser(); } + /** + * Creates a new FTPFileEntryParser. + * + * @return a new FTPFileEntryParser. + */ public FTPFileEntryParser createNTFTPEntryParser() { return createNTFTPEntryParser(null); } @@ -193,10 +208,20 @@ public class DefaultFTPFileEntryParserFactory implements FTPFileEntryParserFacto new UnixFTPEntryParser(config2, config2 != null && FTPClientConfig.SYST_UNIX_TRIM_LEADING.equals(config2.getServerSystemKey())) }); } + /** + * Creates a new OS2FTPEntryParser. + * + * @return a new OS2FTPEntryParser. + */ public FTPFileEntryParser createOS2FTPEntryParser() { return new OS2FTPEntryParser(); } + /** + * Creates a new FTPFileEntryParser. + * + * @return a new FTPFileEntryParser. + */ public FTPFileEntryParser createOS400FTPEntryParser() { return createOS400FTPEntryParser(null); } @@ -218,10 +243,20 @@ public class DefaultFTPFileEntryParserFactory implements FTPFileEntryParserFacto new UnixFTPEntryParser(config2, config2 != null && FTPClientConfig.SYST_UNIX_TRIM_LEADING.equals(config2.getServerSystemKey())) }); } + /** + * Creates a new UnixFTPEntryParser. + * + * @return a new UnixFTPEntryParser. + */ public FTPFileEntryParser createUnixFTPEntryParser() { return new UnixFTPEntryParser(); } + /** + * Creates a new VMSVersioningFTPEntryParser. + * + * @return a new VMSVersioningFTPEntryParser. + */ public FTPFileEntryParser createVMSVersioningFTPEntryParser() { return new VMSVersioningFTPEntryParser(); } diff --git a/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java b/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java index 97f2d7d1..a40dfe83 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java @@ -177,6 +177,8 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable } /** + * Gets the defaultDateFormat. + * * @return the defaultDateFormat. */ public SimpleDateFormat getDefaultDateFormat() { @@ -184,6 +186,8 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable } /** + * Gets the defaultDateFormat pattern string. + * * @return the defaultDateFormat pattern string. */ public String getDefaultDateFormatString() { @@ -191,6 +195,8 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable } /** + * Gets the recentDateFormat. + * * @return the recentDateFormat. */ public SimpleDateFormat getRecentDateFormat() { @@ -198,6 +204,8 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable } /** + * Gets the recentDateFormat. + * * @return the recentDateFormat. */ public String getRecentDateFormatString() { @@ -205,6 +213,8 @@ public class FTPTimestampParserImpl implements FTPTimestampParser, Configurable } /** + * Gets the serverTimeZone used by this parser. + * * @return the serverTimeZone used by this parser. */ public TimeZone getServerTimeZone() { diff --git a/src/main/java/org/apache/commons/net/nntp/Article.java b/src/main/java/org/apache/commons/net/nntp/Article.java index 62381caa..73bc977b 100644 --- a/src/main/java/org/apache/commons/net/nntp/Article.java +++ b/src/main/java/org/apache/commons/net/nntp/Article.java @@ -108,10 +108,19 @@ public class Article implements Threadable<Article> { @Deprecated public Article next; + /** + * Constructs a new instance. + */ public Article() { articleNumber = -1; // isDummy } + /** + * Does nothing. + * + * @param name Ignored. + * @param val Ignored. + */ @Deprecated public void addHeaderField(final String name, final String val) { // empty @@ -244,6 +253,11 @@ public class Article implements Threadable<Article> { return getReferences(); } + /** + * Sets the article ID. + * + * @param string the article ID. + */ public void setArticleId(final String string) { articleId = string; } diff --git a/src/main/java/org/apache/commons/net/nntp/ArticleInfo.java b/src/main/java/org/apache/commons/net/nntp/ArticleInfo.java index 27ea2a8e..7491d983 100644 --- a/src/main/java/org/apache/commons/net/nntp/ArticleInfo.java +++ b/src/main/java/org/apache/commons/net/nntp/ArticleInfo.java @@ -22,10 +22,20 @@ package org.apache.commons.net.nntp; */ public class ArticleInfo { + /** + * Article ID. + */ public String articleId; + /** + * Article number. + */ public long articleNumber; + /** + * Constructs a new instance. + */ public ArticleInfo() { + // empty } } diff --git a/src/main/java/org/apache/commons/net/nntp/Threadable.java b/src/main/java/org/apache/commons/net/nntp/Threadable.java index 39cbdf8e..eed94c82 100644 --- a/src/main/java/org/apache/commons/net/nntp/Threadable.java +++ b/src/main/java/org/apache/commons/net/nntp/Threadable.java @@ -18,25 +18,62 @@ package org.apache.commons.net.nntp; /** - * A placeholder interface for threadable message objects Author: Rory Winston (rwins...@checkfree.com) + * A placeholder interface for threadable message objects. * * @param <T> The Threadable implementation. */ public interface Threadable<T extends Threadable<T>> { + /** + * Tests whether this is a dummy instance. + * + * @return whether this is a dummy instance. + */ boolean isDummy(); + /** + * Creates a dummy instance. + * + * @return a dummy instance. + */ T makeDummy(); + /** + * Gets an ID. + * @return an ID. + */ String messageThreadId(); + /** + * Gets reference strings. + * @return reference strings. + */ String[] messageThreadReferences(); + /** + * Sets the child instance. + * + * @param child the child instance. + */ void setChild(T child); + /** + * Sets the next instance. + * @param next the next instance. + */ void setNext(T next); + /** + * Gets the simplified subject. + * + * @return the simplified subject. + */ String simplifiedSubject(); + /** + * Tests whether this is a reply. + * + * @return whether this is a reply. + */ boolean subjectIsReply(); } diff --git a/src/main/java/org/apache/commons/net/util/ListenerList.java b/src/main/java/org/apache/commons/net/util/ListenerList.java index 78c0727d..7e6fcc01 100644 --- a/src/main/java/org/apache/commons/net/util/ListenerList.java +++ b/src/main/java/org/apache/commons/net/util/ListenerList.java @@ -25,6 +25,7 @@ import java.util.Iterator; import java.util.concurrent.CopyOnWriteArrayList; /** + * A list of event listeners. */ public class ListenerList implements Serializable, Iterable<EventListener> {