FileDocCategorySizeDatePackage
MultiMapValuesEnumeration.javaAPI DocGlassfish v2 API2967Fri May 04 22:33:14 BST 2007org.apache.tomcat.util.collections

MultiMapValuesEnumeration

public class MultiMapValuesEnumeration extends Object implements Enumeration
Enumerate the values for a (possibly ) multiple value element.

Fields Summary
int
pos
int
size
org.apache.tomcat.util.buf.MessageBytes
next
MultiMap
headers
String
name
Constructors Summary
MultiMapValuesEnumeration(MultiMap headers, String name, boolean toString)

        this.name=name;
	this.headers=headers;
	pos=0;
	size = headers.size();
	findNext();
    
Methods Summary
private voidfindNext()

	next=null;
	for( ; pos< size; pos++ ) {
	    MessageBytes n1=headers.getName( pos );
	    if( n1.equalsIgnoreCase( name )) {
		next=headers.getValue( pos );
		break;
	    }
	}
	pos++;
    
public booleanhasMoreElements()

	return next!=null;
    
public java.lang.ObjectnextElement()

	MessageBytes current=next;
	findNext();
	return current.toString();