ucl.physiol.neuroconstruct.project.cellchoice
Class CellChooser

java.lang.Object
  extended by ucl.physiol.neuroconstruct.project.cellchoice.CellChooser
Direct Known Subclasses:
AllCells, FixedNumberCells, IndividualCells, PercentageOfCells, RegionAssociatedCells

public abstract class CellChooser
extends Object

Base class for all Cell Choosers. This can be extended to allow different subsets of Cell Groups to be selected. The primary purpose of this is to allow elec stims be put on subsets of cell groups, e.g. all cells, a percentage of cells, cells in a 3D region, etc. Alternative future uses may be envisioned

Author:
Padraig Gleeson

Constructor Summary
CellChooser(String description)
           
 
Method Summary
 Object clone()
           
protected abstract  int generateNextCellIndex()
           
 ArrayList<Integer> getCachedCellList()
           
protected  ArrayList<PositionRecord> getCopyCellPositions()
           
 String getDescription()
           
 int getNextCellIndex()
          Gets the next chosen cell index based on the settings in the sub class
 ArrayList<Integer> getOrderedCellList()
           
 InternalStringFloatParameter[] getParameterList()
           
 String getParameterStringValue(String parameterName)
           
 float getParameterValue(String parameterName)
           
 void initialise(ArrayList<PositionRecord> cellPositions)
           
 boolean isInitialised()
           
protected abstract  void reinitialise()
           
 void setParameter(String parameterName, float parameterValue)
          Puts the specified parameter into the proper InternalStringFloatParameter Note: can be over ridden if there are specific checks to be made on the parameter
 void setParameter(String parameterName, String parameterStringValue)
          Puts the specified parameter into the proper InternalStringFloatParameter Note: can be over ridden if there are specific checks to be made on the parameter
 void setParameterList(InternalStringFloatParameter[] parameterList)
           
abstract  String toNiceString()
           
abstract  String toShortString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CellChooser

public CellChooser(String description)
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

getCopyCellPositions

protected ArrayList<PositionRecord> getCopyCellPositions()

getDescription

public String getDescription()

initialise

public void initialise(ArrayList<PositionRecord> cellPositions)

getOrderedCellList

public ArrayList<Integer> getOrderedCellList()
                                      throws CellChooserException
Throws:
CellChooserException

getCachedCellList

public ArrayList<Integer> getCachedCellList()
                                     throws CellChooserException
Throws:
CellChooserException

getNextCellIndex

public int getNextCellIndex()
                     throws AllCellsChosenException,
                            CellChooserException
Gets the next chosen cell index based on the settings in the sub class

Throws:
AllCellsChosenException
CellChooserException

isInitialised

public boolean isInitialised()

generateNextCellIndex

protected abstract int generateNextCellIndex()
                                      throws AllCellsChosenException,
                                             CellChooserException
Throws:
AllCellsChosenException
CellChooserException

reinitialise

protected abstract void reinitialise()

getParameterValue

public float getParameterValue(String parameterName)

getParameterStringValue

public String getParameterStringValue(String parameterName)

setParameter

public void setParameter(String parameterName,
                         float parameterValue)
                  throws CellChooserException
Puts the specified parameter into the proper InternalStringFloatParameter Note: can be over ridden if there are specific checks to be made on the parameter

Throws:
CellChooserException

setParameter

public void setParameter(String parameterName,
                         String parameterStringValue)
                  throws CellChooserException
Puts the specified parameter into the proper InternalStringFloatParameter Note: can be over ridden if there are specific checks to be made on the parameter

Throws:
CellChooserException

toString

public String toString()
Overrides:
toString in class Object

toNiceString

public abstract String toNiceString()

toShortString

public abstract String toShortString()

getParameterList

public InternalStringFloatParameter[] getParameterList()

setParameterList

public void setParameterList(InternalStringFloatParameter[] parameterList)