public class SimpleLoadedData extends java.lang.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(java.lang.String extraLine)
Add a line to the internal extra line cache
|
void |
addMessage(java.lang.String message,
java.lang.Object... args)
Add a formatted message to the internal message cache.
|
void |
addTreatmentStep(TreatmentStep step)
Add a treatment step to the internal cache.
|
java.util.List<java.lang.String> |
getExtraLines()
Returns a list of non-processed raw lines from the file.
|
java.util.List<java.lang.String> |
getMessages()
Returns a list of messages produced during file reading, intended for
presentation to the user.
|
java.util.List<TreatmentStep> |
getTreatmentSteps()
Returns the treatment steps read from the file.
|
void |
setTreatmentSteps(java.util.List<TreatmentStep> steps)
Replace the current treatment step cache with a supplied list.
|
public java.util.List<TreatmentStep> getTreatmentSteps()
LoadedData
getTreatmentSteps
in interface LoadedData
public java.util.List<java.lang.String> getMessages()
LoadedData
getMessages
in interface LoadedData
public java.util.List<java.lang.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(java.lang.String message, java.lang.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(java.lang.String extraLine)
extraLine
- the line to addpublic void setTreatmentSteps(java.util.List<TreatmentStep> steps)
steps
- the treatment steps with which to replace the current cache