![]() |
SudokuFX
|
Represents user-configurable options for the SudokuFX application. More...
Collaboration diagram for fr.softsf.sudokufx.model.Options:Classes | |
| class | OptionsBuilder |
Builder class for creating Options instances with fluent API. More... | |
Public Member Functions | |
| Options (Long optionsid, @Nonnull @NotNull String hexcolor, @Nonnull @NotNull String imagepath, @Nonnull @NotNull String songpath, boolean opaque, boolean muted) | |
| Full constructor to initialize all fields of options. | |
| boolean | equals (Object obj) |
| Compares two Options objects for equality based on all fields. | |
| String | getHexcolor () |
| Returns the ARGB hex color string. | |
| String | getImagepath () |
| Returns the background image path. | |
| boolean | getMuted () |
| Returns true if the background song is muted. | |
| boolean | getOpaque () |
| Returns true if the background image is opaque. | |
| Long | getOptionsid () |
| Returns the unique ID of this Options instance. | |
| String | getSongpath () |
| Returns the background song path. | |
| int | hashCode () |
| Computes the hash code based on all fields. | |
| void | setHexcolor (@Nonnull String hexcolor) |
| Sets the ARGB hex color after validation. | |
| void | setImagepath (@Nonnull String imagepath) |
| Sets the background image path after validation. | |
| void | setMuted (boolean muted) |
| Sets whether the background song is muted. | |
| void | setOpaque (boolean opaque) |
| Sets whether the background image is opaque. | |
| void | setSongpath (@Nonnull String songpath) |
| Sets the background song path after validation. | |
| String | toString () |
| Returns a string representation of the Options object. | |
Static Public Member Functions | |
| static OptionsBuilder | builder () |
Returns a new OptionsBuilder instance for fluent construction. | |
Protected Member Functions | |
| Options () | |
| Protected default constructor for JPA. | |
Static Private Member Functions | |
| static String | validateHexcolor (String hexcolor) |
| Validates that the hex color is non-blank and conforms to ARGB 8-character hex format. | |
| static String | validatePath (String path, String nullMsg) |
| Validates a file path for non-null and maximum length. | |
Private Attributes | |
| String | hexcolor = DEFAULT_HEX_COLOR |
| Background color in ARGB hex format (e.g., FFFFFFFF). | |
| String | imagepath = EMPTY_PATH |
| Path to the background image file. | |
| boolean | muted = true |
| Flag indicating if the background music is muted. | |
| boolean | opaque = true |
| Flag indicating if the background image is opaque. | |
| Long | optionsid |
| Unique identifier of the options (primary key). | |
| String | songpath = EMPTY_PATH |
| Path to the background song file. | |
Static Private Attributes | |
| static final String | DEFAULT_HEX_COLOR = "FFFFFFFF" |
| static final String | EMPTY_PATH = "" |
| static final Pattern | HEX_COLOR_PATTERN = Pattern.compile("^([A-Fa-f0-9]{8})$") |
| static final String | HEXCOLOR_MUST_NOT_BE_NULL_OR_BLANK |
| static final String | IMAGEPATH_MUST_NOT_BE_NULL = "imagepath must not be null" |
| static final String | INVALID_HEX_COLOR_FORMAT |
| static final int | MAX_PATH_LENGTH = 260 |
| static final String | SONGPATH_MUST_NOT_BE_NULL = "songpath must not be null" |
Represents user-configurable options for the SudokuFX application.
Includes background color, image and song paths, and flags for image usage, opacity, and muting. Provides fluent builder, validation, and standard object methods.
|
protected |
Protected default constructor for JPA.
Here is the call graph for this function:| fr.softsf.sudokufx.model.Options.Options | ( | Long | optionsid, |
| @Nonnull @NotNull String | hexcolor, | ||
| @Nonnull @NotNull String | imagepath, | ||
| @Nonnull @NotNull String | songpath, | ||
| boolean | opaque, | ||
| boolean | muted ) |
Full constructor to initialize all fields of options.
| optionsid | unique ID of the options |
| hexcolor | background color in ARGB hex format |
| imagepath | path to background image |
| songpath | path to background song |
| opaque | true if the image is opaque |
| muted | true if the song is muted |
Here is the call graph for this function:
|
static |
Returns a new OptionsBuilder instance for fluent construction.
| boolean fr.softsf.sudokufx.model.Options.equals | ( | Object | obj | ) |
Compares two Options objects for equality based on all fields.
Here is the call graph for this function:| String fr.softsf.sudokufx.model.Options.getHexcolor | ( | ) |
Returns the ARGB hex color string.
| String fr.softsf.sudokufx.model.Options.getImagepath | ( | ) |
Returns the background image path.
| boolean fr.softsf.sudokufx.model.Options.getMuted | ( | ) |
Returns true if the background song is muted.
| boolean fr.softsf.sudokufx.model.Options.getOpaque | ( | ) |
Returns true if the background image is opaque.
| Long fr.softsf.sudokufx.model.Options.getOptionsid | ( | ) |
Returns the unique ID of this Options instance.
| String fr.softsf.sudokufx.model.Options.getSongpath | ( | ) |
Returns the background song path.
| int fr.softsf.sudokufx.model.Options.hashCode | ( | ) |
Computes the hash code based on all fields.
| void fr.softsf.sudokufx.model.Options.setHexcolor | ( | @Nonnull String | hexcolor | ) |
Sets the ARGB hex color after validation.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Options.setImagepath | ( | @Nonnull String | imagepath | ) |
Sets the background image path after validation.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Options.setMuted | ( | boolean | muted | ) |
Sets whether the background song is muted.
| void fr.softsf.sudokufx.model.Options.setOpaque | ( | boolean | opaque | ) |
Sets whether the background image is opaque.
| void fr.softsf.sudokufx.model.Options.setSongpath | ( | @Nonnull String | songpath | ) |
Sets the background song path after validation.
Here is the call graph for this function:| String fr.softsf.sudokufx.model.Options.toString | ( | ) |
Returns a string representation of the Options object.
|
staticprivate |
Validates that the hex color is non-blank and conforms to ARGB 8-character hex format.
| hexcolor | the color string to validate |
| IllegalArgumentException | if hexcolor is blank or invalid |
|
staticprivate |
Validates a file path for non-null and maximum length.
| path | path string to validate |
| nullMsg | exception message if path is null |
| NullPointerException | if path is null |
| IllegalArgumentException | if path exceeds MAX_PATH_LENGTH |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
Background color in ARGB hex format (e.g., FFFFFFFF).
|
staticprivate |
|
private |
Path to the background image file.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
Flag indicating if the background music is muted.
|
private |
Flag indicating if the background image is opaque.
|
private |
Unique identifier of the options (primary key).
|
private |
Path to the background song file.
|
staticprivate |