public interface CloseableNamingEnumeration<T> extends NamingEnumeration<T>, NamingCloseable
try-with-resources.| Modifier and Type | Field and Description |
|---|---|
static CloseableNamingEnumeration<?> |
EMPTY |
NULL| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the enumeration.
|
static <T> CloseableNamingEnumeration<T> |
empty() |
static <T> CloseableNamingEnumeration<T> |
fromEnumeration(Enumeration<T> enumeration)
Create a naming enumeration from a collection enumeration.
|
static <T> CloseableNamingEnumeration<T> |
fromEnumeration(NamingEnumeration<T> enumeration)
Create a closeable naming enumeration from a naming enumeration.
|
static <T> CloseableNamingEnumeration<T> |
fromIterable(Iterable<T> iterable)
Create a naming enumeration from an iterable collection.
|
static <T> CloseableNamingEnumeration<T> |
fromIterator(Iterator<T> iterator)
Create a naming enumeration from a collection iterator.
|
hasMore, nexthasMoreElements, nextElementstatic final CloseableNamingEnumeration<?> EMPTY
void close()
throws NamingException
close in interface AutoCloseableclose in interface NamingCloseableclose in interface NamingEnumeration<T>NamingException - if closing the enumeration failed for some reasonstatic <T> CloseableNamingEnumeration<T> fromIterable(Iterable<T> iterable)
T - the element typeiterable - the iterablestatic <T> CloseableNamingEnumeration<T> fromIterator(Iterator<T> iterator)
T - the element typeiterator - the iteratorstatic <T> CloseableNamingEnumeration<T> fromEnumeration(Enumeration<T> enumeration)
T - the element typeenumeration - the enumerationstatic <T> CloseableNamingEnumeration<T> fromEnumeration(NamingEnumeration<T> enumeration)
T - the element typeenumeration - the enumerationstatic <T> CloseableNamingEnumeration<T> empty()
Copyright © 2017 JBoss by Red Hat. All rights reserved.