Record Class ParsedArguments
java.lang.Object
java.lang.Record
me.pauleff.common.argparse.ParsedArguments
- Record Components:
serverPath- the path to the server folder, if specifiedtoOnlineMode-truefor online conversion,falsefor offline, or empty when no conversion was requestedcopyPlayerDataSourceWorld- the source world folder name to copy player data from, if requestedserverPropertiesChanges- key/value pairs to apply toserver.properties; may be empty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecopyPlayerDataSourceWorldrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanIndicates whether an online/offline conversion was requested.Returns the value of theserverPathrecord component.Returns the value of theserverPropertiesChangesrecord component.booleanIndicates whether player data should be copied from another world.Returns the value of thetoOnlineModerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParsedArguments
public ParsedArguments(Optional<Path> serverPath, Optional<Boolean> toOnlineMode, Optional<String> copyPlayerDataSourceWorld, Map<String, String> serverPropertiesChanges) Creates an instance of aParsedArgumentsrecord class.- Parameters:
serverPath- the value for theserverPathrecord componenttoOnlineMode- the value for thetoOnlineModerecord componentcopyPlayerDataSourceWorld- the value for thecopyPlayerDataSourceWorldrecord componentserverPropertiesChanges- the value for theserverPropertiesChangesrecord component
-
-
Method Details
-
isConversionOperation
public boolean isConversionOperation()Indicates whether an online/offline conversion was requested.- Returns:
trueiftoOnlineModeis present;falseotherwise
-
shouldCopyPlayerData
public boolean shouldCopyPlayerData()Indicates whether player data should be copied from another world.- Returns:
trueifcopyPlayerDataSourceWorldis present;falseotherwise
-
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). -
serverPath
Returns the value of theserverPathrecord component.- Returns:
- the value of the
serverPathrecord component
-
toOnlineMode
Returns the value of thetoOnlineModerecord component.- Returns:
- the value of the
toOnlineModerecord component
-
copyPlayerDataSourceWorld
Returns the value of thecopyPlayerDataSourceWorldrecord component.- Returns:
- the value of the
copyPlayerDataSourceWorldrecord component
-
serverPropertiesChanges
Returns the value of theserverPropertiesChangesrecord component.- Returns:
- the value of the
serverPropertiesChangesrecord component
-