Ostermillerutil Java Utilities Basic Iterators and Enumerations - com.Ostermiller.util Java Utilities

Classes to convert between enumerations and iterators. Also classes to convert arrays to enumerations or iterators.



Example

Enumeration e = new IteratorEnumeration(
    collection.iterator()
);

Convert an Iterator to an Enumeration: IteratorEnumeration



Example

Iterator i = new EnumerationIterator(
    vector.elements()
);

Convert an Enumeration to an Iterator: EnumerationIterator



Example

Enumeration e = new ArrayEnumeration(
    new String[]{"one","two","three"}
);

Convert an array to an Enumeration: ArrayEnumeration



Example

Iterator i = new ArrayIterator(
    new String[]{"one","two","three"}
);

Convert an array to an Iterator: ArrayIterator



License

OstermillerUtil Java Utilities Copyright (c) 2001-2020 by Stephen Ostermiller and other contributors

The OstermillerUtils library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

License FAQs - Why GPL? How about the LGPL or something else?