public class NewsAddress extends Address
| Modifier and Type | Field and Description | 
|---|---|
protected java.lang.String | 
host  | 
protected java.lang.String | 
newsgroup  | 
| Constructor and Description | 
|---|
NewsAddress()
Default constructor. 
 | 
NewsAddress(java.lang.String newsgroup)
Construct a NewsAddress with the given newsgroup. 
 | 
NewsAddress(java.lang.String newsgroup,
           java.lang.String host)
Construct a NewsAddress with the given newsgroup and host. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(java.lang.Object a)
The equality operator. 
 | 
java.lang.String | 
getHost()
Get the host. 
 | 
java.lang.String | 
getNewsgroup()
Get the newsgroup. 
 | 
java.lang.String | 
getType()
Return the type of this address. 
 | 
int | 
hashCode()
Compute a hash code for the address. 
 | 
static NewsAddress[] | 
parse(java.lang.String newsgroups)
Parse the given comma separated sequence of newsgroups into
 NewsAddress objects. 
 | 
void | 
setHost(java.lang.String host)
Set the host. 
 | 
void | 
setNewsgroup(java.lang.String newsgroup)
Set the newsgroup. 
 | 
java.lang.String | 
toString()
Convert this address into a RFC 1036 address. 
 | 
static java.lang.String | 
toString(Address[] addresses)
Convert the given array of NewsAddress objects into
 a comma separated sequence of address strings. 
 | 
public NewsAddress()
public NewsAddress(java.lang.String newsgroup)
newsgroup - the newsgrouppublic NewsAddress(java.lang.String newsgroup,
                   java.lang.String host)
newsgroup - the newsgrouphost - the hostpublic java.lang.String getType()
getType in class AddressInternetAddresspublic void setNewsgroup(java.lang.String newsgroup)
newsgroup - the newsgrouppublic java.lang.String getNewsgroup()
public void setHost(java.lang.String host)
host - the hostpublic java.lang.String getHost()
public java.lang.String toString()
public boolean equals(java.lang.Object a)
public int hashCode()
hashCode in class java.lang.Objectpublic static java.lang.String toString(Address[] addresses)
addresses - array of NewsAddress objectsjava.lang.ClassCastException - if any address object in the
                given array is not a NewsAddress objects. Note
                that this is a RuntimeException.public static NewsAddress[] parse(java.lang.String newsgroups) throws AddressException
newsgroups - comma separated newsgroup stringAddressException - if the parse failed