edu.indiana.iucbrf.casebase
Class AbstractKeyableCaseBase

java.lang.Object
  extended by edu.indiana.iucbrf.casebase.AbstractCaseBase
      extended by edu.indiana.iucbrf.casebase.AbstractKeyableCaseBase
All Implemented Interfaces:
CaseBase, KeyableCaseBase, SwingRepresentableWithDomain, SwingRepresentable, java.io.Serializable
Direct Known Subclasses:
FileCaseBase, FlatCaseBase, RDBCaseBase

public abstract class AbstractKeyableCaseBase
extends AbstractCaseBase
implements KeyableCaseBase

An AbstractKeyableCaseBase is an AbstractCaseBase that implements the KeyableCaseBase interface. That is, its cases are accessible via keys of type long.

See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList markerList
           
 
Fields inherited from class edu.indiana.iucbrf.casebase.AbstractCaseBase
caseClass, debugMode, DEFAULT_INITIAL_CAPACITY, domain, listeners, prototype
 
Fields inherited from interface edu.indiana.util.swing.SwingRepresentable
TITLE_FONT
 
Constructor Summary
AbstractKeyableCaseBase()
          Creates a new instance of AbstractKeyableCaseBase
AbstractKeyableCaseBase(CaseGenerator caseGenerator, int numToGenerate)
          Construct a case base generated randomly according to a CaseGenerator.
AbstractKeyableCaseBase(java.lang.Class caseClass, int initialCapacity)
           
 
Method Summary
protected  long addCaseImpl(Case caseToAdd)
          This implementation completes the addCase() definition in AbstractCaseBase, but passed most of the work to the abstract addCaseWithKey() method.
 java.util.ArrayList getMarkerKeys()
          Returns an array list of Long objects, containing the keys of any Markers that have been added to this case base.
 long getNextCaseKey()
           
protected  boolean removeCaseImpl(Case c)
           
 
Methods inherited from class edu.indiana.iucbrf.casebase.AbstractCaseBase
addCase, addCaseBaseListener, addCases, addCases, addCases, buildCaseJList, checkCaseType, classMemberIterator, clearAllEstimates, close, ensureCapacity, fireCaseAdded, fireCaseClassChanged, fireCaseRemoved, fireCaseReplaced, fireCasesCleared, getCaseClass, getCasesMatching, getDomain, getPrototype, initializeCB, isEmpty, iterator, removeCase, removeCaseBaseListener, setBaseFileName, setCaseClass, setDebugMode, setDomain, toString, toSwing, toSwing, toVerboseString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.indiana.iucbrf.casebase.KeyableCaseBase
addCaseWithKey, getCase, removeCase
 
Methods inherited from interface edu.indiana.iucbrf.casebase.CaseBase
addCase, addCaseBaseListener, addCases, addCases, addCases, clearAllEstimates, close, ensureCapacity, getCaseClass, getCaseCount, getCasesMatching, getDomain, isEmpty, iterator, removeCase, removeCaseBaseListener, setBaseFileName, setCaseClass, setDomain, toString, toVerboseString
 
Methods inherited from interface edu.indiana.iucbrf.util.SwingRepresentableWithDomain
toSwing
 
Methods inherited from interface edu.indiana.util.swing.SwingRepresentable
toSwing
 

Field Detail

markerList

protected java.util.ArrayList markerList
Constructor Detail

AbstractKeyableCaseBase

public AbstractKeyableCaseBase()
Creates a new instance of AbstractKeyableCaseBase


AbstractKeyableCaseBase

public AbstractKeyableCaseBase(java.lang.Class caseClass,
                               int initialCapacity)

AbstractKeyableCaseBase

public AbstractKeyableCaseBase(CaseGenerator caseGenerator,
                               int numToGenerate)
Construct a case base generated randomly according to a CaseGenerator.

Method Detail

removeCaseImpl

protected boolean removeCaseImpl(Case c)
Specified by:
removeCaseImpl in class AbstractCaseBase

addCaseImpl

protected long addCaseImpl(Case caseToAdd)
This implementation completes the addCase() definition in AbstractCaseBase, but passed most of the work to the abstract addCaseWithKey() method.

Specified by:
addCaseImpl in class AbstractCaseBase
Returns:
the case key

getMarkerKeys

public java.util.ArrayList getMarkerKeys()
Description copied from interface: KeyableCaseBase
Returns an array list of Long objects, containing the keys of any Markers that have been added to this case base.

Specified by:
getMarkerKeys in interface KeyableCaseBase

getNextCaseKey

public long getNextCaseKey()