public class StepSelectorStore
extends java.lang.Object
The design is rudimentary because it does not sort or select which results to keep -- at this time.
Its main purpose is to provide a simple data store for StepSelectorSearch.
Constructor and Description |
---|
StepSelectorStore(ProofAsstPreferences proofAsstPreferences)
Simple constructor for the most basic StepSelectorStore.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Assrt assrt,
java.lang.String[] selection)
Adds a StepSelectorSearch result to the data store if the store is not
already full.
|
StepSelectorResults |
createStepSelectorResults(java.lang.String step,
boolean storeOverflow)
Creates a StepSelectorResults object using the contents of the data
store.
|
static StepSelectorStore |
createStepSelectorStore(ProofAsstPreferences proofAsstPreferences)
Simple factory to hide constructor details.
|
boolean |
isFull()
Checks to see if the store has fewer result items than permitted
according the Proof Assistant Preferences StepSelectorMaxResults value.
|
public StepSelectorStore(ProofAsstPreferences proofAsstPreferences)
proofAsstPreferences
- contains parameters needed by StepSelector
and friends.public static StepSelectorStore createStepSelectorStore(ProofAsstPreferences proofAsstPreferences)
proofAsstPreferences
- contains parameters needed by StepSelector
and friends.public StepSelectorResults createStepSelectorResults(java.lang.String step, boolean storeOverflow)
An extra item is added to the StepSelectorResults. If the store contains one extra result (beyond the specified StepSelectorMaxResults parameter), then "***MORE***" is output at the end of the StepSelectorResults selection array along with a null Assrt. Otherwise it outputs "***END***". The purpose it to inform the user that rerunning the StepSelector may or may not be useful.
step
- Step String corresponding to the ProofWorksheet step (number)
for which the StepSelector was run.storeOverflow
- indicates whether or not additional results were
available but not added to the store because it was full.public boolean add(Assrt assrt, java.lang.String[] selection)
assrt
- Assertion that is unifiable with the proof step.selection
- Strings showing formula as it will appear in the
StepSelectorDialog.public boolean isFull()