public class LimitedEnumeration<T> extends Object implements SkipEnumeration<T>
Enumeration representing the first n
elements of another Enumeration.| Constructor and Description |
|---|
LimitedEnumeration(Enumeration<T> base,
int limit)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMoreElements() |
T |
nextElement() |
void |
skip()
Skip an Element.
|
public LimitedEnumeration(Enumeration<T> base, int limit)
base - the underlying Enumerationlimit - the excluded limitpublic boolean hasMoreElements()
hasMoreElements in interface Enumeration<T>Enumeration.hasMoreElements()public T nextElement() throws NoSuchElementException
nextElement in interface Enumeration<T>NoSuchElementExceptionEnumeration.nextElement()public void skip()
throws NoSuchElementException
skip in interface SkipEnumeration<T>NoSuchElementException - if there are no more ElementsSkipEnumeration.skip()Copyright © 2000–2021 PanEris. All rights reserved.