The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search
Class grendel.storage.addressparser.RFC822AddressList
All Packages  This Package  Class Hierarchy  Class Search  Index

Class grendel.storage.addressparser.RFC822AddressList

java.lang.Object
   |
   +----grendel.storage.addressparser.RFC822AddressList

This class lets you instantiate an address list object from an input string (usually the right hand side to a To: field). You can then detect if they were all valid addresses, or there was some error. You can also access the individual address string to send the address list back out again.


public class  RFC822AddressList
     extends java.lang.Object
{
          // Fields 2
     Vector all_tokens;
     RFC822AddressParser parser;

          // Constructors 2
     RFC822AddressList();
     public RFC822AddressList(String);

          // Methods 4
     public String getAddressString(int);
     public String getErrorString();
     public boolean isError();
     public int size();
}



Fields


parser

   RFC822AddressParser parser


all_tokens

   Vector all_tokens



Constructors


RFC822AddressList

   RFC822AddressList() 

This constructor seems to be needed in order to subclass this class. It should never be directly called as it will create a null and basically useless address list.



RFC822AddressList

   public RFC822AddressList(String str) 

The input string (usually a To: field) is first tokenized, and then parsed into a list of addresses.




Methods


size

   public int size() 

Returns:
Returns the number of addresses in the list. The string representation for each address is indexed from 0 to (size - 1). A return of 0 means an empty address list, probably a result of an error in parsing.


getAddressString

   public String getAddressString(int indx) 

Parameter Description
indx an index from 0 to (size - 1).

Returns:
Either a String representation of the address, or null if the indx is outside the list. Also returns null is there was an error which resulted in no address list.


isError

   public boolean isError() 

Were there errors in tokenizing and parsing this string?



getErrorString

   public String getErrorString() 

Returns:
A string describing the error if there was one. Some errors can return an empty string. No error in the address list returns "No error."


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4
Copyright © 1998-1999 The Mozilla Organization.
Last modified December 25, 1998.