| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class NewsAddress extends Address
This class models an RFC1036 newsgroup address.
Field Summary | |
---|---|
protected String |
host
|
protected String |
newsgroup
|
Constructor Summary | |
---|---|
Default constructor. |
|
NewsAddress(String newsgroup) Construct a NewsAddress with the given newsgroup. |
|
NewsAddress(String newsgroup, String host) Construct a NewsAddress with the given newsgroup and host. |
Method Summary | |
---|---|
boolean |
The equality operator. |
String |
getHost() Get the host. |
String |
Get the newsgroup. |
String |
getType() Return the type of this address. |
int |
hashCode() Compute a hash code for the address. |
static NewsAddress[] |
Parse the given comma separated sequence of newsgroup into NewsAddress objects. |
void |
Set the host. |
void |
setNewsgroup(String newsgroup) Set the newsgroup. |
String |
toString() Convert this address into a RFC 1036 address. |
static String |
Convert the given array of NewsAddress objects into a comma separated sequence of address strings. |
Methods inherited from class javax.mail.Address |
---|
equals, getType, toString |
Field Detail |
---|
protected String host
protected String newsgroup
Constructor Detail |
---|
public NewsAddress()
public NewsAddress(String newsgroup)
newsgroup
- the newsgrouppublic NewsAddress(String newsgroup, String host)
newsgroup
- the newsgrouphost
- the hostMethod Detail |
---|
public boolean equals(Object a)
equals
in class Address
a
public String getHost()
public String getNewsgroup()
public String getType()
getType
in class Address
public int hashCode()
hashCode
in class Object
public static NewsAddress[] parse(String newsgroups) throws AddressException
newsgroups
- comma separated newsgroup stringAddressException
- if the parse failedpublic void setHost(String host)
host
- the hostpublic void setNewsgroup(String newsgroup)
newsgroup
- the newsgrouppublic String toString()
toString
in class Address
public static String toString(Address[] addresses)
addresses
- array of NewsAddress objects
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |