sysModel.fish
Class DynamicFishFactory

java.lang.Object
  extended by sysModel.fish.DynamicFishFactory
All Implemented Interfaces:
IFishFactory

public class DynamicFishFactory
extends java.lang.Object
implements IFishFactory

AFish factory to dynamically create new fish.

Author:
Mathias Ricken

Field Summary
private  java.awt.Color _curColor
           
private  java.lang.String _curName
           
 
Constructor Summary
DynamicFishFactory(java.lang.String name, java.awt.Color color)
          Construct a new factory.
 
Method Summary
 AFish createFish()
          Create a new fish.
 void setName(java.awt.Color newColor)
          Mutator for the color.
 void setName(java.lang.String newName)
          Mutator for the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_curName

private java.lang.String _curName

_curColor

private java.awt.Color _curColor
Constructor Detail

DynamicFishFactory

public DynamicFishFactory(java.lang.String name,
                          java.awt.Color color)
Construct a new factory.

Parameters:
name - initial name
color - initial color
Method Detail

setName

public void setName(java.lang.String newName)
Mutator for the name.

Parameters:
newName - new name

setName

public void setName(java.awt.Color newColor)
Mutator for the color.

Parameters:
newColor - new color

createFish

public AFish createFish()
Create a new fish.

Specified by:
createFish in interface IFishFactory
Returns:
new fish