|
|||||||||
| Home >> All >> javax >> mail >> [ internet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.mail.internet
Class NewsAddress

java.lang.Objectjavax.mail.Address
javax.mail.internet.NewsAddress
- All Implemented Interfaces:
- java.io.Serializable
- public class NewsAddress
- extends javax.mail.Address
A representation of an RFC1036 Internet newsgroup address.
- Version:
- $Rev: 125583 $ $Date: 2005-01-18 19:44:27 -0800 (Tue, 18 Jan 2005) $
| Field Summary | |
protected java.lang.String |
host
The host for this newsgroup |
protected java.lang.String |
newsgroup
The name of this newsgroup |
| Constructor Summary | |
NewsAddress()
|
|
NewsAddress(java.lang.String newsgroup)
|
|
NewsAddress(java.lang.String newsgroup,
java.lang.String host)
|
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Subclasses must provide a suitable implementation of equals(). |
java.lang.String |
getHost()
|
java.lang.String |
getNewsgroup()
|
java.lang.String |
getType()
The type of this address; always "news". |
int |
hashCode()
Get a value that represents this Object, as uniquely as possible within the confines of an int. |
static NewsAddress[] |
parse(java.lang.String addresses)
Parse a comma-spearated list of addresses. |
void |
setHost(java.lang.String host)
|
void |
setNewsgroup(java.lang.String newsgroup)
|
java.lang.String |
toString()
Subclasses must provide a suitable representation of their address. |
static java.lang.String |
toString(javax.mail.Address[] addresses)
Convert the supplied addresses to a comma-separated String. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
host
protected java.lang.String host
- The host for this newsgroup
newsgroup
protected java.lang.String newsgroup
- The name of this newsgroup
| Constructor Detail |
NewsAddress
public NewsAddress()
NewsAddress
public NewsAddress(java.lang.String newsgroup)
NewsAddress
public NewsAddress(java.lang.String newsgroup, java.lang.String host)
| Method Detail |
getType
public java.lang.String getType()
- The type of this address; always "news".
setNewsgroup
public void setNewsgroup(java.lang.String newsgroup)
getNewsgroup
public java.lang.String getNewsgroup()
setHost
public void setHost(java.lang.String host)
getHost
public java.lang.String getHost()
toString
public java.lang.String toString()
- Description copied from class:
javax.mail.Address - Subclasses must provide a suitable representation of their address.
equals
public boolean equals(java.lang.Object o)
- Description copied from class:
javax.mail.Address - Subclasses must provide a suitable implementation of equals().
hashCode
public int hashCode()
- Description copied from class:
java.lang.Object - Get a value that represents this Object, as uniquely as
possible within the confines of an int.
There are some requirements on this method which subclasses must follow:
- Semantic equality implies identical hashcodes. In other
words, if
a.equals(b)is true, thena.hashCode() == b.hashCode()must be as well. However, the reverse is not necessarily true, and two objects may have the same hashcode without being equal. - It must be consistent. Whichever value o.hashCode() returns on the first invocation must be the value returned on all later invocations as long as the object exists. Notice, however, that the result of hashCode may change between separate executions of a Virtual Machine, because it is not invoked on the same object.
Notice that since
hashCodeis used in java.util.Hashtable and other hashing classes, a poor implementation will degrade the performance of hashing (so don't blindly implement it as returning a constant!). Also, if calculating the hash is time-consuming, a class may consider caching the results.The default implementation returns
System.identityHashCode(this) - Semantic equality implies identical hashcodes. In other
words, if
parse
public static NewsAddress[] parse(java.lang.String addresses) throws AddressException
- Parse a comma-spearated list of addresses.
toString
public static java.lang.String toString(javax.mail.Address[] addresses)
- Convert the supplied addresses to a comma-separated String.
If addresses is null, returns null; if empty, returns an empty string.
|
|||||||||
| Home >> All >> javax >> mail >> [ internet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC