Added method for checking to see if a tileset is mapped to an id.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1175 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-04-03 22:03:23 +00:00
parent 093edd4750
commit 507920843d
2 changed files with 20 additions and 2 deletions
@@ -1,5 +1,5 @@
//
// $Id: TileSetIDBroker.java,v 1.2 2001/11/21 02:42:15 mdb Exp $
// $Id: TileSetIDBroker.java,v 1.3 2002/04/03 22:03:21 mdb Exp $
package com.threerings.media.tile;
@@ -30,6 +30,17 @@ public interface TileSetIDBroker
public int getTileSetID (String tileSetName)
throws PersistenceException;
/**
* Returns true if the specified tileset name is currently mapped to
* some value by this broker.
*
* @exception PersistenceException thrown if an error occurs
* communicating with the underlying persistence mechanism used to
* store the name to id mappings.
*/
public boolean tileSetMapped (String tileSetName)
throws PersistenceException;
/**
* When the user of a tilset id broker is done obtaining tileset ids,
* it must call this method to give the tileset id broker an
@@ -1,5 +1,5 @@
//
// $Id: MapFileTileSetIDBroker.java,v 1.2 2002/02/05 20:29:09 mdb Exp $
// $Id: MapFileTileSetIDBroker.java,v 1.3 2002/04/03 22:03:23 mdb Exp $
package com.threerings.media.tile.tools;
@@ -64,6 +64,13 @@ public class MapFileTileSetIDBroker implements TileSetIDBroker
return tsid.intValue();
}
// documentation inherited from interface
public boolean tileSetMapped (String tileSetName)
throws PersistenceException
{
return _map.containsKey(tileSetName);
}
// documentation inherited
public void commit ()
throws PersistenceException