Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jun 16, 2024
1 parent 1a6bc1d commit 403986c
Showing 1 changed file with 67 additions and 11 deletions.
78 changes: 67 additions & 11 deletions src/main/java/org/apache/commons/net/nntp/Article.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
import org.apache.commons.net.util.NetConstants;

/**
* This is a class that contains the basic state needed for message retrieval and threading. With thanks to Jamie Zawinski (jwz@jwz.org)
* Basic state needed for message retrieval and threading. With thanks to Jamie Zawinski (jwz@jwz.org)
*/
public class Article implements Threadable {

/**
* Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
*
Expand Down Expand Up @@ -122,23 +123,48 @@ private void flushSubjectCache() {
simplifiedSubject = null;
}

/**
* Gets the article ID.
*
* @return the article ID.
*/
public String getArticleId() {
return articleId;
}

/**
* Gets the article number.
*
* @return the article number.
*/
@Deprecated
public int getArticleNumber() {
return (int) articleNumber;
}

/**
* Gets the article number.
*
* @return the article number.
*/
public long getArticleNumberLong() {
return articleNumber;
}

/**
* Gets the article date header.
*
* @return the article date header.
*/
public String getDate() {
return date;
}

/**
* Gets the article from header.
*
* @return the article from header.
*/
public String getFrom() {
return from;
}
Expand All @@ -155,6 +181,11 @@ public String[] getReferences() {
return references.toArray(NetConstants.EMPTY_STRING_ARRAY);
}

/**
* Gets the article subject.
*
* @return the article subject.
*/
public String getSubject() {
return subject;
}
Expand Down Expand Up @@ -183,13 +214,23 @@ public void setArticleId(final String string) {
articleId = string;
}

/**
* Sets the article number.
*
* @param articleNumber the article number.
*/
@Deprecated
public void setArticleNumber(final int a) {
articleNumber = a;
public void setArticleNumber(final int articleNumber) {
this.articleNumber = articleNumber;
}

public void setArticleNumber(final long l) {
articleNumber = l;
/**
* Sets the article number.
*
* @param articleNumber the article number.
*/
public void setArticleNumber(final long articleNumber) {
this.articleNumber = articleNumber;
}

@Override
Expand All @@ -198,12 +239,22 @@ public void setChild(final Threadable child) {
flushSubjectCache();
}

public void setDate(final String string) {
date = string;
/**
* Sets the article date header.
*
* @param date the article date header.
*/
public void setDate(final String date) {
this.date = date;
}

public void setFrom(final String string) {
from = string;
/**
* Sets the article from header.
*
* @param from the article from header.
*/
public void setFrom(final String from) {
this.from = from;
}

@Override
Expand All @@ -212,8 +263,13 @@ public void setNext(final Threadable next) {
flushSubjectCache();
}

public void setSubject(final String string) {
subject = string;
/**
* Sets the article subject.
*
* @param subject the article subject.
*/
public void setSubject(final String subject) {
this.subject = subject;
}

@Override
Expand Down

0 comments on commit 403986c

Please sign in to comment.