org.vizzini.game
Interface IPosition

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
AbstractPosition, IntegerPosition, VectorPosition

public interface IPosition
extends Cloneable, Serializable

Defines methods required by positions in the game framework. A position instance encapsulates the information of a position in the environment. Examples are 2D or 3D coordinates. Implementations of this interface should be immutable.

Since:
v0.1
Version:
v0.1
Author:
Jeffrey M. Thompson

Method Summary
 IPosition add(IPosition position)
          Add the given position to this.
 Object clone()
          Return a clone of this instance.
 IPosition subtract(IPosition position)
          Subtract the given position from this.
 

Method Detail

add

IPosition add(IPosition position)
Add the given position to this.

Parameters:
position - The position to add.
Returns:
A new position object which is this plus the given position.
Since:
v0.1

clone

Object clone()
Return a clone of this instance.

Since:
v0.1

subtract

IPosition subtract(IPosition position)
Subtract the given position from this.

Parameters:
position - The position to subtract.
Returns:
A new position object which is this minus the given position.
Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02