public class NewsAddress extends Address
| 构造器和说明 |
|---|
NewsAddress()
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object a)
The equality operator.
|
String |
getHost()
Get the host.
|
String |
getNewsgroup()
Get the newsgroup.
|
String |
getType()
Return the type of this address.
|
int |
hashCode()
Compute a hash code for the address.
|
static NewsAddress[] |
parse(String newsgroups)
Parse the given comma separated sequence of newsgroups into
NewsAddress objects.
|
void |
setHost(String host)
Set the host.
|
void |
setNewsgroup(String newsgroup)
Set the newsgroup.
|
String |
toString()
Convert this address into a RFC 1036 address.
|
static String |
toString(Address[] addresses)
Convert the given array of NewsAddress objects into
a comma separated sequence of address strings.
|
public NewsAddress()
public NewsAddress(String newsgroup)
newsgroup - the newsgrouppublic String getType()
getType 在类中 AddressInternetAddresspublic void setNewsgroup(String newsgroup)
newsgroup - the newsgrouppublic String getNewsgroup()
public void setHost(String host)
host - the hostpublic String getHost()
public String toString()
public boolean equals(Object a)
public static String toString(Address[] addresses)
addresses - array of NewsAddress objectsClassCastException - if any address object in the
given array is not a NewsAddress objects. Note
that this is a RuntimeException.public static NewsAddress[] parse(String newsgroups) throws AddressException
newsgroups - comma separated newsgroup stringAddressException - if the parse failedCopyright © 2021 Oracle. All rights reserved.