|
J2EE1.4 SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.mail.Address
javax.mail.internet.NewsAddress
This class models an RFC1036 newsgroup address.
| Field Summary | |
protected java.lang.String |
host
|
protected java.lang.String |
newsgroup
|
| Constructor Summary | |
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. |
|
| Method Summary | |
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 newsgroup 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. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String newsgroup
protected java.lang.String host
| Constructor Detail |
public NewsAddress()
public NewsAddress(java.lang.String newsgroup)
newsgroup - the newsgroup
public NewsAddress(java.lang.String newsgroup,
java.lang.String host)
newsgroup - the newsgrouphost - the host| Method Detail |
public 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()
toString in class Addresspublic boolean equals(java.lang.Object a)
equals in class Addressa - Address objectpublic int hashCode()
public static java.lang.String toString(Address[] addresses)
addresses - array of NewsAddress objects
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 string
AddressException - if the parse failed
|
J2EE1.4 SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2003 Sun Microsystems, Inc. All rights reserved.