org.apache.tomcat.util.http
Class MimeHeaders.NamesEnumerator

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

protected class MimeHeaders.NamesEnumerator
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).


Field Summary
protected  java.lang.String next
           
protected  int pos
           
protected  int size
           
 
Constructor Summary
protected MimeHeaders.NamesEnumerator()
           
 
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
 

Field Detail

pos

protected int pos

size

protected int size

next

protected java.lang.String next
Constructor Detail

MimeHeaders.NamesEnumerator

protected MimeHeaders.NamesEnumerator()
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.