org.smtose.shadowedhorizons.world
Interface Locale

All Known Implementing Classes:
GridLocale, HexLocale, OpenLocale

public interface Locale

Defines the Locale interface.

The Locale class is copyright© 2005 smtose.org (www.smtose.org)

Author:
Gregory Brown, smtose.org

Method Summary
 MetaObject[] allObjects()
           
 MetaObject get(int objectID)
           
 MetaObject get(MetaObject meta)
           
 MetaObject get(Position pos)
          Gets the object at a given position, removing it from the Locale.
 MetaObject get(java.lang.String name)
          Gets an object by a given name, removing it from the Locale.
 Position getNamedPoint(java.lang.String key)
           
 boolean isEmpty(Position pos)
           
 boolean isInLocale(MetaObject meta)
           
 void move(MetaObject meta, Position newPos)
           
 void move(Position oldPos, Position newPos)
           
 MetaObject peek(Position pos)
           
 void put(MetaObject meta)
          Puts an object into the locale at the first open position.
 void put(MetaObject meta, Position pos)
          Puts an object into the locale at a given position.
 void remove(int objectID)
           
 void remove(MetaObject meta)
           
 void remove(java.lang.String name)
           
 void setNamedPoint(java.lang.String key, Position pos)
           
 

Method Detail

put

public void put(MetaObject meta,
                Position pos)
Puts an object into the locale at a given position.

Parameters:
meta - the MetaObject to add
pos - the Position to add the object at

put

public void put(MetaObject meta)
Puts an object into the locale at the first open position.

Parameters:
meta - the MetaObject to add

get

public MetaObject get(Position pos)
Gets the object at a given position, removing it from the Locale.

Parameters:
pos - The position to fetch the object from
Returns:
The requested object

get

public MetaObject get(java.lang.String name)
Gets an object by a given name, removing it from the Locale.

Parameters:
name - The name of the object to get
Returns:
The requested object

get

public MetaObject get(int objectID)

get

public MetaObject get(MetaObject meta)

remove

public void remove(MetaObject meta)

remove

public void remove(java.lang.String name)

remove

public void remove(int objectID)

move

public void move(MetaObject meta,
                 Position newPos)

move

public void move(Position oldPos,
                 Position newPos)

isEmpty

public boolean isEmpty(Position pos)

allObjects

public MetaObject[] allObjects()

getNamedPoint

public Position getNamedPoint(java.lang.String key)

setNamedPoint

public void setNamedPoint(java.lang.String key,
                          Position pos)

isInLocale

public boolean isInLocale(MetaObject meta)

peek

public MetaObject peek(Position pos)