Package org.dspace.scripts
Class DSpaceCommandLineParameter
java.lang.Object
org.dspace.scripts.DSpaceCommandLineParameter
This class serves as a representation of a command line parameter by holding
a String name and a String value.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDSpaceCommandLineParameter(String parameter) This constructors accepts a single parameter String that is defined as e.g.DSpaceCommandLineParameter(String key, String value) This constructor will take a String key and String value and store them in their appropriate fields. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringconcatenate(List<DSpaceCommandLineParameter> parameterList) This method will convert a list of DSpaceCommandLineParameter objects into a single String.booleanWill return a boolean indicating whether the given parameter is equal to this object.getName()getValue()inthashCode()voidvoidtoString()Converts the DSpaceCommandLineParameter into a String format by concatenating the value and the name String values by separating them with a space.
-
Field Details
-
SEPARATOR
-
-
Constructor Details
-
DSpaceCommandLineParameter
This constructor will take a String key and String value and store them in their appropriate fields.- Parameters:
key- The String value to be stored as the name of the parametervalue- The String value to be stored as the value of the parameter
-
DSpaceCommandLineParameter
This constructors accepts a single parameter String that is defined as e.g. "-c test" and it'll parse this String into the key "-c" and value "test" to then call the other constructor with those parameters- Parameters:
parameter- The String parameter
-
-
Method Details
-
getName
-
setName
-
getValue
-
setValue
-
toString
Converts the DSpaceCommandLineParameter into a String format by concatenating the value and the name String values by separating them with a space. -
concatenate
This method will convert a list of DSpaceCommandLineParameter objects into a single String. This is done by calling the toString() method on each of the DSpaceCommandLineParameter objects in the list and concatenating them with the Separator defined in this class- Parameters:
parameterList- The list of DSpaceCommandLineParameter objects to be converted into a String- Returns:
- The resulting String
-
equals
Will return a boolean indicating whether the given parameter is equal to this object. -
hashCode
public int hashCode()
-