com.avian.birds.basebirds
Class TestErrBird

java.lang.Object
  extended by javax.swing.SwingWorker<java.lang.String,java.lang.String>
      extended by com.avian.birds.basebirds.AbstractBasicBird
          extended by com.avian.birds.basebirds.StdBird
              extended by com.avian.birds.basebirds.TestErrBird
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.String>, java.util.concurrent.RunnableFuture<java.lang.String>

public class TestErrBird
extends StdBird


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Field Summary
 
Fields inherited from class com.avian.birds.basebirds.StdBird
foodFromTree, healthStatus, jbRefStart, jlRefLastAte, jtaRefHistory, jtfRefHealth, mts, myTupleTree, nts, sampleXmv, startButtonText
 
Fields inherited from class com.avian.birds.basebirds.AbstractBasicBird
bhf, bif, birdDesc, birdHistory, birdName, bof, eatsFood, hatchTime, historyFileName, inputFileName, lastAte, levelOfInfo, lifeTime, napLength, outputFileName, stamina, stopNow, storesFood
 
Constructor Summary
TestErrBird()
           
 
Method Summary
 void digest()
          Provides the processing functionality for this StdBird.
 
Methods inherited from class com.avian.birds.basebirds.StdBird
checkAge, done, eatFood, setHealthRef, setHealthStatus, setHistoryAreaRef, setJlRefLastAte, setStartButtonRef, setStartButtonText, setTupleTree, storeFood
 
Methods inherited from class com.avian.birds.basebirds.AbstractBasicBird
addToBirdHistory, doInBackground, getAuxFood, getBirdDescription, getBirdHistory, getBirdName, getEatsFood, getHatchTime, getHistoryFileName, getInputFileName, getLastAte, getLevelOfInfo, getLifeTime, getNameOfFoodToStore, getNapLength, getOutputFileName, getStamina, isStopNow, setBhf, setBif, setBirdDesc, setBirdHistory, setBirdName, setBof, setEatsFood, setHatchTime, setHistoryFileName, setInputFileName, setLevelOfInfo, setLevelOfInfo, setLifeTime, setNapLength, setOutputFileName, setStamina, setStopNow, setStoresFood
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestErrBird

public TestErrBird()
Method Detail

digest

public void digest()
Description copied from class: StdBird
Provides the processing functionality for this StdBird. Whatever food (work packet) the StdBird has eaten, it applies the processing that is specified in this method to the food, modifying the food and preparing it for the next Bird to eat. The intent is that each bird do some discrete chunk of processing when it digests, some meaningful amount of processing that produces an interim result.

Every different kind of Bird can be expected to digest differently. That is the whole reason for making different Birds and having them eat different foods, to handle different situations outside of code logic. For example, consider a situation where you have a special condition that involves a lot of convoluted logic to correctly handle that special condition. Instead of coding it, store it as a different kind of food and then add a Bird that will eat just that special kind of food. Set that Bird's stamina high because it won't eat often, but when it does it, it handles the special condition without a lot of complicated logic or deeply nested if statements.

Overrides:
digest in class StdBird