One day we hope to implement Iterable, let's implement the standard
'iterator()' name and deprecate the old 'entries()' method. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3405 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: DSet.java,v 1.32 2004/08/27 02:20:20 mdb Exp $
|
// $Id$
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -158,8 +158,21 @@ public class DSet
|
|||||||
* support modification (nor iteration while modifications are being
|
* support modification (nor iteration while modifications are being
|
||||||
* made to the set). It should not be kept around as it can quickly
|
* made to the set). It should not be kept around as it can quickly
|
||||||
* become out of date.
|
* become out of date.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public Iterator entries ()
|
public Iterator entries ()
|
||||||
|
{
|
||||||
|
return iterator();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an iterator over the entries of this set. It does not
|
||||||
|
* support modification (nor iteration while modifications are being
|
||||||
|
* made to the set). It should not be kept around as it can quickly
|
||||||
|
* become out of date.
|
||||||
|
*/
|
||||||
|
public Iterator iterator ()
|
||||||
{
|
{
|
||||||
// the crazy sanity checks
|
// the crazy sanity checks
|
||||||
if (_size < 0 ||_size > _entries.length ||
|
if (_size < 0 ||_size > _entries.length ||
|
||||||
|
|||||||
Reference in New Issue
Block a user