Package org.apache.commons.net.nntp

# Class Article

java.lang.Object
org.apache.commons.net.nntp.Article

All Implemented Interfaces:
  `Threadable`

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Article`
  `kid`
  `Article`
  `next`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Article()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addHeaderField(String name, String val)`
  Deprecated.
  `void`
  `addReference(String msgId)`
  Adds a message-id to the list of messages that this message references (i.e.
  `String`
  `getArticleId()`
  `int`
  `getArticleNumber()`
  Deprecated.
  `long`
  `getArticleNumberLong()`
  `String`
  `getDate()`
  `String`
  `getFrom()`
  `String[]`
  `getReferences()`
  Returns the MessageId references as an array of Strings
  `String`
  `getSubject()`
  `boolean`
  `isDummy()`
  `Threadable`
  `makeDummy()`
  `String`
  `messageThreadId()`
  `String[]`
  `messageThreadReferences()`
  `static void`
  `printThread(Article article)`
  Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
  `static void`
  `printThread(Article article, int depth)`
  Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
  `static void`
  `printThread(Article article, int depth, PrintStream ps)`
  Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
  `static void`
  `printThread(Article article, PrintStream ps)`
  Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
  `void`
  `setArticleId(String string)`
  `void`
  `setArticleNumber(int a)`
  Deprecated.
  `void`
  `setArticleNumber(long l)`
  `void`
  `setChild(Threadable child)`
  `void`
  `setDate(String string)`
  `void`
  `setFrom(String string)`
  `void`
  `setNext(Threadable next)`
  `void`
  `setSubject(String string)`
  `String`
  `simplifiedSubject()`
  `boolean`
  `subjectIsReply()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### kid

    public Article kid

  - ### next

    public Article next

- ## Constructor Details

  - ### Article

    public Article()

- ## Method Details

  - ### printThread

    public static void printThread(Article article)
    Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
    Parameters:
      `article` - the root of the article 'tree'
    Since:
      3.4

  - ### printThread

    public static void printThread(Article article, int depth)
    Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
    Parameters:
      `article` - the root of the article 'tree'
      `depth` - the current tree depth

  - ### printThread

    public static void printThread(Article article, int depth, PrintStream ps)
    Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
    Parameters:
      `article` - the root of the article 'tree'
      `depth` - the current tree depth
      `ps` - the PrintStream to use
    Since:
      3.4

  - ### printThread

    public static void printThread(Article article, PrintStream ps)
    Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.
    Parameters:
      `article` - the root of the article 'tree'
      `ps` - the PrintStream to use
    Since:
      3.4

  - ### addHeaderField

    @Deprecated public void addHeaderField(String name, String val)
    Deprecated.

  - ### addReference

    public void addReference(String msgId)
    Adds a message-id to the list of messages that this message references (i.e. replies to)
    Parameters:
      `msgId` - the message id to add

  - ### getArticleId

    public String getArticleId()

  - ### getArticleNumber

    @Deprecated public int getArticleNumber()
    Deprecated.

  - ### getArticleNumberLong

    public long getArticleNumberLong()

  - ### getDate

    public String getDate()

  - ### getFrom

    public String getFrom()

  - ### getReferences

    public String[] getReferences()
    Returns the MessageId references as an array of Strings
    Returns:
      an array of message-ids

  - ### getSubject

    public String getSubject()

  - ### isDummy

    public boolean isDummy()
    Specified by:
      `isDummy` in interface `Threadable`

  - ### makeDummy

    public Threadable makeDummy()
    Specified by:
      `makeDummy` in interface `Threadable`

  - ### messageThreadId

    public String messageThreadId()
    Specified by:
      `messageThreadId` in interface `Threadable`

  - ### messageThreadReferences

    public String[] messageThreadReferences()
    Specified by:
      `messageThreadReferences` in interface `Threadable`

  - ### setArticleId

    public void setArticleId(String string)

  - ### setArticleNumber

    @Deprecated public void setArticleNumber(int a)
    Deprecated.

  - ### setArticleNumber

    public void setArticleNumber(long l)

  - ### setChild

    public void setChild(Threadable child)
    Specified by:
      `setChild` in interface `Threadable`

  - ### setDate

    public void setDate(String string)

  - ### setFrom

    public void setFrom(String string)

  - ### setNext

    public void setNext(Threadable next)
    Specified by:
      `setNext` in interface `Threadable`

  - ### setSubject

    public void setSubject(String string)

  - ### simplifiedSubject

    public String simplifiedSubject()
    Specified by:
      `simplifiedSubject` in interface `Threadable`

  - ### subjectIsReply

    public boolean subjectIsReply()
    Specified by:
      `subjectIsReply` in interface `Threadable`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`