You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.4 KiB
61 lines
1.4 KiB
package application.helpers.wrappers;
|
|
|
|
import application.enums.EntryType;
|
|
import application.parsing.FileWrapper;
|
|
|
|
/**
|
|
* This class wraps the information saved in one line of all files except the Me
|
|
* File.
|
|
*
|
|
* @author Bianca
|
|
*
|
|
*/
|
|
public class GeneralSaveInfo
|
|
{
|
|
/**
|
|
* A readable name of the file where these values should be saved
|
|
*/
|
|
private String readableFilename;
|
|
/** The values to be saved **/
|
|
private String[] values;
|
|
|
|
/**
|
|
* Initializes the attributes
|
|
* @param values The values to be saved
|
|
* @param type The {@link EntryType} of this info.
|
|
* @param subCategory The subCategory as specifier for the file (e.g subRecord name)
|
|
*/
|
|
public GeneralSaveInfo(String[] values, EntryType type, String subCategory)
|
|
{
|
|
this.values = values;
|
|
this.readableFilename = FileWrapper.createReadableFileName(type.getValue(), subCategory);
|
|
}
|
|
|
|
/**
|
|
* Initializes the attributes
|
|
* @param values The values to be saved
|
|
* @param type The {@link EntryType} of this info.
|
|
*/
|
|
public GeneralSaveInfo(String[] values, EntryType type)
|
|
{
|
|
this(values, type, "");
|
|
}
|
|
|
|
/**
|
|
* Returns the filename of the file where this data should be saved
|
|
* @return The described value.
|
|
*/
|
|
public String getReadableFilename()
|
|
{
|
|
return readableFilename;
|
|
}
|
|
|
|
/**
|
|
* Returns the values which should be saved.
|
|
* @return The described values.
|
|
*/
|
|
public String[] getValues()
|
|
{
|
|
return values;
|
|
}
|
|
}
|