public class SimpleLoadedData extends Object implements LoadedData
LoadedData
interface. It caches
treatment steps, messages, and extra lines, and returns those cached
lists via the getters in the interface.Constructor and Description |
---|
SimpleLoadedData() |
Modifier and Type | Method and Description |
---|---|
void |
addExtraLine(String extraLine)
Add a line to the internal extra line cache
|
void |
addMessage(String message,
Object... args)
Add a formatted message to the internal message cache.
|
void |
addTreatmentStep(TreatmentStep step)
Add a treatment step to the internal cache.
|
List<String> |
getExtraLines()
Returns a list of non-processed raw lines from the file.
|
List<String> |
getMessages()
Returns a list of messages produced during file reading, intended for
presentation to the user.
|
List<TreatmentStep> |
getTreatmentSteps()
Returns the treatment steps read from the file.
|
void |
setTreatmentSteps(List<TreatmentStep> steps)
Replace the current treatment step cache with a supplied list.
|
public List<TreatmentStep> getTreatmentSteps()
LoadedData
getTreatmentSteps
in interface LoadedData
public List<String> getMessages()
LoadedData
getMessages
in interface LoadedData
public List<String> getExtraLines()
LoadedData
Suite
.
Currently it is only used to allow PplLoader
to pass sample-,
site-, and suite-level data on to the suite, and is ignored by
Suite
for all other loader classes.getExtraLines
in interface LoadedData
public void addTreatmentStep(TreatmentStep step)
step
- the treatment step to add.public void addMessage(String message, Object... args)
Locale.ENGLISH
locale. Formatting
is done with String.format
.message
- the message to add, as a format stringargs
- arguments referenced by the format specifiers in the format
stringString.format(java.util.Locale, java.lang.String, java.lang.Object...)
public void addExtraLine(String extraLine)
extraLine
- the line to addpublic void setTreatmentSteps(List<TreatmentStep> steps)
steps
- the treatment steps with which to replace the current cacheCopyright © 2022. All rights reserved.