001package votorola.g.util; // Copyright 2009, 2012, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. 002 003import java.util.*; 004 005 006/** A skeletal implementation of an iterable iterator, which, being iterable, may be the 007 * target of a <code>foreach</code> statement. 008 * 009 * @see <a href='http://stackoverflow.com/questions/839178' target='_top' 010 * >Why is Java's Iterator not an Iterable?</a> 011 * 012 * @deprecated in favour of simply implementing a proper iterable, which is a 013 * multi-use iterator factory. IterableIteratorA breaks that behaviour. 014 */ @Deprecated 015public abstract class IterableIteratorA<T> extends IteratorA<T> implements Iterable<T> 016{ 017 018 // - I t e r a b l e ------------------------------------------------------------------ 019 020 021 /** Returns this iterable iterator. 022 */ 023 public final Iterator<T> iterator() { return this; } 024 025 026 027}