org.apache.commons.net.nntp

## Class Threader

- java.lang.Object
- - org.apache.commons.net.nntp.Threader

-     public class Threader
      extends Object

  This is an implementation of a message threading algorithm, as originally devised by Zamie Zawinski. See http://www.jwz.org/doc/threading.html for details. For his Java implementation, see https://lxr.mozilla.org/mozilla/source/grendel/sources/grendel/view/Threader.java

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Threader()` Constructs a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Threadable` | `thread(Iterable<? extends Threadable> messages)` The client passes in a list of Iterable objects, and the Threader constructs a connected 'graph' of messages
    `Threadable` | `thread(List<? extends Threadable> messages)` The client passes in a list of Threadable objects, and the Threader constructs a connected 'graph' of messages

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

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

- - ### Constructor Detail

    - #### Threader

          public Threader()

      Constructs a new instance.

  - ### Method Detail

    - #### thread

          public Threadable thread(Iterable<? extends Threadable> messages)

      The client passes in a list of Iterable objects, and the Threader constructs a connected 'graph' of messages
      Parameters:
        `messages` - iterable of messages to thread, must not be empty
      Returns:
        null if messages == null or root.child == null or messages list is empty

    - #### thread

          public Threadable thread(List<? extends Threadable> messages)

      The client passes in a list of Threadable objects, and the Threader constructs a connected 'graph' of messages
      Parameters:
        `messages` - list of messages to thread, must not be empty
      Returns:
        null if messages == null or root.child == null or messages list is empty