com.consultoriajava.browneater
Class ExternalBrownResolver

java.lang.Object
  extended by com.consultoriajava.browneater.BrownEater
      extended by com.consultoriajava.browneater.ExternalBrownResolver
All Implemented Interfaces:
BrownerIdentifier

public class ExternalBrownResolver
extends BrownEater
implements BrownerIdentifier

ExternalBrownEaters objects are created from this class, which provides basic functionality for eating browns without the need of internal coorporative suffering.

Author:
consultoriajava.com

Constructor Summary
ExternalBrownResolver()
           
 
Method Summary
 void eatBrown(Brown brown)
          Method called when a Brown is supposed to be solved and killed or at least hibernated.
 Browner identifyBrowner(java.lang.Object potentialBrowner)
          This method allows the identification a given Browner from a given object
 void negotiateCosts()
          The ExternalBrownResolver negotiates his salary with Management using this method.
 
Methods inherited from class com.consultoriajava.browneater.BrownEater
getStress, increaseStress, reduceStress
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalBrownResolver

public ExternalBrownResolver()
Method Detail

negotiateCosts

public void negotiateCosts()
The ExternalBrownResolver negotiates his salary with Management using this method.


identifyBrowner

public Browner identifyBrowner(java.lang.Object potentialBrowner)
Description copied from interface: BrownerIdentifier
This method allows the identification a given Browner from a given object

Specified by:
identifyBrowner in interface BrownerIdentifier
Parameters:
potentialBrowner - The object to be evaluated
Returns:
The identified Browner

eatBrown

public void eatBrown(Brown brown)
              throws BrownOverflowException
Description copied from class: BrownEater
Method called when a Brown is supposed to be solved and killed or at least hibernated. This method must be overwritten by the extending class.

Specified by:
eatBrown in class BrownEater
Parameters:
brown - Brown to be eated, and by extension, killed or hibernated.
Throws:
BrownOverflowException