Util.Statistics
Class IndividualCatcher

java.lang.Object
  extended by Util.Statistics.IndividualCatcher
All Implemented Interfaces:
ParameterI

public class IndividualCatcher
extends java.lang.Object
implements ParameterI

Stores Individuals

Version:
2006.1102
Author:
Blip

Constructor Summary
IndividualCatcher()
          Creates a new instance of StatCatcher
IndividualCatcher(java.util.Properties p)
          New instance
 
Method Summary
 void addPop(java.util.List<Individual> population)
          Add the population to a StringBuffer.
 void addString(java.lang.String s)
          Add a string to the string buffer
 void clear()
          Clear the stringbuffer
 int getCapacity()
          Get the capacity of the stringbuffer
 int getCatchInterval()
          Get catch intervall
 void setCatchInterval(int catchInterval)
          Individuals in the population are stored according to this interval.
 void setProperties(java.util.Properties p)
          Set properties
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndividualCatcher

public IndividualCatcher()
Creates a new instance of StatCatcher


IndividualCatcher

public IndividualCatcher(java.util.Properties p)
New instance

Parameters:
p - properties
Method Detail

setProperties

public void setProperties(java.util.Properties p)
Description copied from interface: ParameterI
Set properties

Specified by:
setProperties in interface ParameterI
Parameters:
p - object containing properties

addPop

public void addPop(java.util.List<Individual> population)
Add the population to a StringBuffer. Individuals are taken according to catchInterval

Parameters:
population - Population

addString

public void addString(java.lang.String s)
Add a string to the string buffer

Parameters:
s - string

clear

public void clear()
Clear the stringbuffer


getCapacity

public int getCapacity()
Get the capacity of the stringbuffer

Returns:
capacity of stringbuffer

setCatchInterval

public void setCatchInterval(int catchInterval)
Individuals in the population are stored according to this interval. E.g A value of 10 stores individual 1, 100, 200, ...

Parameters:
catchInterval - Interval for catching

getCatchInterval

public int getCatchInterval()
Get catch intervall

Returns:
catch interval

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object