wodka.ga.geno.lang
Class AbstractLanguage

java.lang.Object
  extended bywodka.ga.geno.lang.AbstractLanguage
All Implemented Interfaces:
wwan.commons.param.Configurable, ContentComparable, GenotypeDesc, wwan.commons.param.Informative, Language, java.io.Serializable, StreamPersistable
Direct Known Subclasses:
AssemblerLanguage, TurtleLanguage

public abstract class AbstractLanguage
extends java.lang.Object
implements Language, wwan.commons.param.Configurable

Contains common functionality for all languages.

Author:
wwagner4
See Also:
Serialized Form

Field Summary
protected  SodaGlobalsRanges globalRanges
           
 
Constructor Summary
AbstractLanguage()
           
AbstractLanguage(int gridWidth)
           
 
Method Summary
 void checkParameterList(wwan.commons.param.ListParam listParam)
           
protected abstract  int defaultGridWidth()
           
protected abstract  int defaultProgramLength()
           
protected abstract  void defineProgramLengthValues(wwan.commons.param.enum.EnumParamDesc pld)
           
 void fromStream(java.io.DataInputStream inStream, int version)
           
 SodaGlobalsRanges getGlobalRanges()
           
 int getGridWidth()
           
 java.lang.String getInfo()
           
 wwan.commons.param.ListParamDesc getParameterDescription()
           
 int getPgmLength()
           
 int getProgramLength()
           
 int getVersion()
           
 boolean hasEqualContents(java.lang.Object obj)
           
 void setFieldsFromParameterList(wwan.commons.param.ListParam listParam)
           
 void setGlobalRanges(SodaGlobalsRanges globalRanges)
           
 void setGridWidth(int gridWidth)
           
 void setParameterListFromFields(wwan.commons.param.ListParam listParam)
           
 void setPgmLength(int pgmLength)
           
 void toStream(java.io.DataOutputStream outStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wodka.ga.GenotypeDesc
createRandomGenotype, getLabel, getShortName
 

Field Detail

globalRanges

protected SodaGlobalsRanges globalRanges
Constructor Detail

AbstractLanguage

public AbstractLanguage(int gridWidth)

AbstractLanguage

public AbstractLanguage()
Method Detail

getGlobalRanges

public SodaGlobalsRanges getGlobalRanges()

setGlobalRanges

public void setGlobalRanges(SodaGlobalsRanges globalRanges)

setGridWidth

public void setGridWidth(int gridWidth)

setPgmLength

public void setPgmLength(int pgmLength)

defaultProgramLength

protected abstract int defaultProgramLength()

defaultGridWidth

protected abstract int defaultGridWidth()

fromStream

public void fromStream(java.io.DataInputStream inStream,
                       int version)
                throws java.io.IOException
Specified by:
fromStream in interface StreamPersistable
Throws:
java.io.IOException

getVersion

public int getVersion()
Specified by:
getVersion in interface StreamPersistable

getGridWidth

public int getGridWidth()
Specified by:
getGridWidth in interface Language

getProgramLength

public int getProgramLength()
Specified by:
getProgramLength in interface Language

checkParameterList

public void checkParameterList(wwan.commons.param.ListParam listParam)
                        throws wwan.commons.param.ParamException
Specified by:
checkParameterList in interface wwan.commons.param.Configurable
Throws:
wwan.commons.param.ParamException

getParameterDescription

public wwan.commons.param.ListParamDesc getParameterDescription()
                                                         throws wwan.commons.param.ParamException
Specified by:
getParameterDescription in interface wwan.commons.param.Configurable
Throws:
wwan.commons.param.ParamException

defineProgramLengthValues

protected abstract void defineProgramLengthValues(wwan.commons.param.enum.EnumParamDesc pld)
                                           throws wwan.commons.param.ParamException
Throws:
wwan.commons.param.ParamException

setFieldsFromParameterList

public void setFieldsFromParameterList(wwan.commons.param.ListParam listParam)
                                throws wwan.commons.param.ParamException
Specified by:
setFieldsFromParameterList in interface wwan.commons.param.Configurable
Throws:
wwan.commons.param.ParamException

setParameterListFromFields

public void setParameterListFromFields(wwan.commons.param.ListParam listParam)
                                throws wwan.commons.param.ParamException
Specified by:
setParameterListFromFields in interface wwan.commons.param.Configurable
Throws:
wwan.commons.param.ParamException

getInfo

public java.lang.String getInfo()
Specified by:
getInfo in interface GenotypeDesc

hasEqualContents

public boolean hasEqualContents(java.lang.Object obj)
Specified by:
hasEqualContents in interface ContentComparable

toStream

public void toStream(java.io.DataOutputStream outStream)
              throws java.io.IOException
Specified by:
toStream in interface StreamPersistable
Throws:
java.io.IOException

getPgmLength

public int getPgmLength()