Top Description Fields Constructors Methods
org.apache.tomcat.util.http

pack-priv Class NamesEnumerator

Located in compilation unit of org.apache.tomcat.util.http.MimeHeaders.

extends Object
implements Enumeration<String>
Class Inheritance
All Implemented Interfaces
java.util.Enumeration

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

Field Summary

Modifier and TypeField and Description
private final MimeHeaders
private String
private int
private final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
public boolean
hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

public String
nextElement()

Implements java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

headersback to summary
private final MimeHeaders headers
nextback to summary
private String next
posback to summary
private int pos
sizeback to summary
private final int size

Constructor Detail

NamesEnumeratorback to summary
pack-priv NamesEnumerator(MimeHeaders headers)

Method Detail

findNextback to summary
private void findNext()
hasMoreElementsback to summary
public boolean hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Doc from java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

Returns:boolean

true if and only if this enumeration object contains at least one more element to provide; false otherwise.

Annotations
@Override
nextElementback to summary
public String nextElement()

Implements java.util.Enumeration.nextElement.

Doc from java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Returns:String

the next element of this enumeration.

Annotations
@Override