Record Class LauncherShortcut
java.lang.Object
java.lang.Record
jdk.jpackage.internal.model.LauncherShortcut
public record LauncherShortcut(Optional<LauncherShortcutStartupDirectory> startupDirectory)
extends Record
A shortcut to launch an application launcher.
-
Constructor Summary
ConstructorsConstructorDescriptionLauncherShortcut(Optional<LauncherShortcutStartupDirectory> startupDirectory) Creates an instance of aLauncherShortcutrecord class.LauncherShortcut(LauncherShortcutStartupDirectory startupDirectory) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thestartupDirectoryrecord component.toRequest(Optional<LauncherShortcut> shortcut) Converts the given shortcut into a shortcut request.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LauncherShortcut
Creates an instance of aLauncherShortcutrecord class.- Parameters:
startupDirectory- the value for thestartupDirectoryrecord component
-
LauncherShortcut
-
LauncherShortcut
public LauncherShortcut()
-
-
Method Details
-
toRequest
Converts the given shortcut into a shortcut request.Returns
trueif shortcut was explicitly requested.Returns
falseif no shortcut was explicitly requested.Returns an empty
Optionalinstance if there was no shortcut request.- Returns:
- shortcut request
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
startupDirectory
Returns the value of thestartupDirectoryrecord component.- Returns:
- the value of the
startupDirectoryrecord component
-