Class CAPreferencesService
java.lang.Object
com.io7m.cardant.client.preferences.vanilla.CAPreferencesService
- All Implemented Interfaces:
CAPreferencesServiceType,com.io7m.repetoir.core.RPServiceType
The default preferences service.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CAPreferencesServiceTypeopenOrDefault(Path file) Open preferences or return the default preferences values.voidsave(CAPreferences newPreferences) Save preferences to persistent storage.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.cardant.client.preferences.api.CAPreferencesServiceType
addRecentFile, update
-
Method Details
-
openOrDefault
Open preferences or return the default preferences values.- Parameters:
file- The preferences file- Returns:
- A preferences service
- Throws:
IOException- On I/O errors
-
preferences
- Specified by:
preferencesin interfaceCAPreferencesServiceType- Returns:
- The current preferences
-
save
Description copied from interface:CAPreferencesServiceTypeSave preferences to persistent storage.- Specified by:
savein interfaceCAPreferencesServiceType- Parameters:
newPreferences- The new preferences- Throws:
IOException- On I/O errors
-
toString
-
description
- Specified by:
descriptionin interfacecom.io7m.repetoir.core.RPServiceType
-