org.vizzini.game.boardgame.chess.action
Class PawnPromotionCaptureActionPool

java.lang.Object
  extended by org.vizzini.game.boardgame.action.AbstractGridBoardActionPool
      extended by org.vizzini.game.boardgame.chess.action.PawnPromotionCaptureActionPool

final class PawnPromotionCaptureActionPool
extends AbstractGridBoardActionPool

Provides a pool for move capture action objects.

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

Constructor Summary
PawnPromotionCaptureActionPool()
          Construct this object.
PawnPromotionCaptureActionPool(int maxSize)
          Construct this object with the given parameter.
 
Method Summary
 PawnPromotionCaptureAction acquire(IChessEnvironment board, IChessAgent agent, IntegerPosition fromPosition, IntegerPosition toPosition, Class tokenClass)
          Return an instance from the reusable object pool, creating it if necessary.
 void release(IAction action)
          Return an instance to the reusable object pool.
 
Methods inherited from class org.vizzini.game.boardgame.action.AbstractGridBoardActionPool
getPool, incrementCreationCount, report, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PawnPromotionCaptureActionPool

public PawnPromotionCaptureActionPool()
Construct this object.

Since:
v0.3

PawnPromotionCaptureActionPool

public PawnPromotionCaptureActionPool(int maxSize)
Construct this object with the given parameter.

Parameters:
maxSize - Guess at the maximum size of the pool. The pool will expand as necessary.
Since:
v0.3
Method Detail

acquire

public PawnPromotionCaptureAction acquire(IChessEnvironment board,
                                          IChessAgent agent,
                                          IntegerPosition fromPosition,
                                          IntegerPosition toPosition,
                                          Class tokenClass)
Return an instance from the reusable object pool, creating it if necessary.

Since:
v0.3

release

public void release(IAction action)
Return an instance to the reusable object pool.

Overrides:
release in class AbstractGridBoardActionPool
Parameters:
action - The instance to release.
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02