org.apache.commons.net.nntp

## Class NewsgroupInfo

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

-     public final class NewsgroupInfo
      extends Object

  NewsgroupInfo stores information pertaining to a newsgroup returned by the NNTP GROUP, LIST, and NEWGROUPS commands, implemented by `selectNewsgroup` , `listNewsgroups` , and `listNewNewsgroups` respectively.
  See Also:
    `NNTPClient`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) static NewsgroupInfo[]` | `EMPTY_ARRAY` The empty array of this type.
    `static int` | `MODERATED_POSTING_PERMISSION` A constant indicating that a newsgroup is moderated.
    `static int` | `PERMITTED_POSTING_PERMISSION` A constant indicating that a newsgroup is public and unmoderated.
    `static int` | `PROHIBITED_POSTING_PERMISSION` A constant indicating that a newsgroup is closed for general posting.
    `static int` | `UNKNOWN_POSTING_PERMISSION` A constant indicating that the posting permission of a newsgroup is unknown.

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getArticleCount()` Deprecated.
    `long` | `getArticleCountLong()` Gets the estimated number of articles in the newsgroup.
    `int` | `getFirstArticle()` Deprecated.
    `long` | `getFirstArticleLong()` Gets the number of the first article in the newsgroup.
    `int` | `getLastArticle()` Deprecated.
    `long` | `getLastArticleLong()` Gets the number of the last article in the newsgroup.
    `String` | `getNewsgroup()` Gets the newsgroup name.
    `int` | `getPostingPermission()` Gets the posting permission of the newsgroup.
    `(package private) void` | `setArticleCount(long count)`
    `(package private) void` | `setFirstArticle(long first)`
    `(package private) void` | `setLastArticle(long last)`
    `(package private) void` | `setNewsgroup(String newsgroup)`
    `(package private) void` | `setPostingPermission(int permission)`

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

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

- - ### Field Detail

    - #### EMPTY_ARRAY

          static final NewsgroupInfo[] EMPTY_ARRAY

      The empty array of this type.

    - #### MODERATED_POSTING_PERMISSION

          public static final int MODERATED_POSTING_PERMISSION

      A constant indicating that a newsgroup is moderated.
      See Also:
        Constant Field Values

    - #### PERMITTED_POSTING_PERMISSION

          public static final int PERMITTED_POSTING_PERMISSION

      A constant indicating that a newsgroup is public and unmoderated.
      See Also:
        Constant Field Values

    - #### PROHIBITED_POSTING_PERMISSION

          public static final int PROHIBITED_POSTING_PERMISSION

      A constant indicating that a newsgroup is closed for general posting.
      See Also:
        Constant Field Values

    - #### UNKNOWN_POSTING_PERMISSION

          public static final int UNKNOWN_POSTING_PERMISSION

      A constant indicating that the posting permission of a newsgroup is unknown. For example, the NNTP GROUP command does not return posting information, so NewsgroupInfo instances obtained from that command will have an UNKNOWN_POSTING_PERMISSION.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### NewsgroupInfo

          public NewsgroupInfo()

      Constructs a new instance.

  - ### Method Detail

    - #### getArticleCount

          @Deprecated
          public int getArticleCount()

      Deprecated.
      Gets the estimated number of articles in the newsgroup. The accuracy of this value will depend on the server implementation.
      Returns:
        The estimated number of articles in the newsgroup.

    - #### getArticleCountLong

          public long getArticleCountLong()

      Gets the estimated number of articles in the newsgroup. The accuracy of this value will depend on the server implementation.
      Returns:
        The estimated number of articles in the newsgroup.

    - #### getFirstArticle

          @Deprecated
          public int getFirstArticle()

      Deprecated.
      Gets the number of the first article in the newsgroup.
      Returns:
        The number of the first article in the newsgroup.

    - #### getFirstArticleLong

          public long getFirstArticleLong()

      Gets the number of the first article in the newsgroup.
      Returns:
        The number of the first article in the newsgroup.

    - #### getLastArticle

          @Deprecated
          public int getLastArticle()

      Deprecated.
      Gets the number of the last article in the newsgroup.
      Returns:
        The number of the last article in the newsgroup.

    - #### getLastArticleLong

          public long getLastArticleLong()

      Gets the number of the last article in the newsgroup.
      Returns:
        The number of the last article in the newsgroup.

    - #### getNewsgroup

          public String getNewsgroup()

      Gets the newsgroup name.
      Returns:
        The name of the newsgroup.

    - #### getPostingPermission

          public int getPostingPermission()

      Gets the posting permission of the newsgroup. This will be one of the `POSTING_PERMISSION` constants.
      Returns:
        The posting permission status of the newsgroup.

    - #### setArticleCount

          void setArticleCount(long count)

    - #### setFirstArticle

          void setFirstArticle(long first)

    - #### setLastArticle

          void setLastArticle(long last)

    - #### setNewsgroup

          void setNewsgroup(String newsgroup)

    - #### setPostingPermission

          void setPostingPermission(int permission)