[Japi-cvs] SF.net SVN: japi: [228] libs
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2006-11-26 23:18:14
|
Revision: 228 http://svn.sourceforge.net/japi/?rev=228&view=rev Author: christianhujer Date: 2006-11-26 15:18:12 -0800 (Sun, 26 Nov 2006) Log Message: ----------- Added EmptyEnumeration to util. Modified Paths: -------------- libs/swing-bookmarks/trunk/libs-swing-bookmarks.iml Added Paths: ----------- libs/util/trunk/src/net/ libs/util/trunk/src/net/sf/ libs/util/trunk/src/net/sf/japi/ libs/util/trunk/src/net/sf/japi/util/ libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java Modified: libs/swing-bookmarks/trunk/libs-swing-bookmarks.iml =================================================================== --- libs/swing-bookmarks/trunk/libs-swing-bookmarks.iml 2006-11-26 23:16:13 UTC (rev 227) +++ libs/swing-bookmarks/trunk/libs-swing-bookmarks.iml 2006-11-26 23:18:12 UTC (rev 228) @@ -9,6 +9,7 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="libs-swing-action" /> + <orderEntry type="module" module-name="libs-util" /> <orderEntryProperties /> </component> <component name="copyright"> Copied: libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java (from rev 225, historic/trunk/src/app/net/sf/japi/util/EmptyEnumeration.java) =================================================================== --- libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java (rev 0) +++ libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java 2006-11-26 23:18:12 UTC (rev 228) @@ -0,0 +1,44 @@ +/* JAPI - (Yet another (hopefully) useful) Java API + * + * Copyright (C) 2004-2006 Christian Hujer + * + * This program 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +package net.sf.japi.util; + +import java.util.Enumeration; +import java.util.NoSuchElementException; + +/** Empty Enumeration. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class EmptyEnumeration<E> implements Enumeration<E> { + + /** Create a new EmptyEnumeration. */ + public EmptyEnumeration() {} + + /** {@inheritDoc} */ + public boolean hasMoreElements() { + return false; + } + + /** {@inheritDoc} */ + public E nextElement() { + throw new NoSuchElementException(); + } + +} // class EmptyEnumeration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |