org.apache.tomcat.util.http
Class Parameters.NamesEnumeration

java.lang.Object
  extended by org.apache.tomcat.util.http.Parameters.NamesEnumeration
All Implemented Interfaces:
java.util.Enumeration
Enclosing class:
Parameters

protected class Parameters.NamesEnumeration
extends java.lang.Object
implements java.util.Enumeration

Enumerate the distinct header names. Each nextElement() is O(n) ( a comparation is done with all previous elements ). This is less frequesnt than add() - we want to keep add O(1).


Constructor Summary
Parameters.NamesEnumeration()
          Create a new multi-map enumeration.
 
Method Summary
 boolean hasMoreElements()
           
 java.lang.Object nextElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parameters.NamesEnumeration

public Parameters.NamesEnumeration()
Create a new multi-map enumeration.

Parameters:
headers - the collection to enumerate
toString - convert each name to string
unique - return only unique names
Method Detail

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface java.util.Enumeration

nextElement

public java.lang.Object nextElement()
Specified by:
nextElement in interface java.util.Enumeration


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.