FileDocCategorySizeDatePackage
MultiMapValuesEnumeration.javaAPI DocApache Tomcat 6.0.141820Fri Jul 20 04:20:36 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();