public class Parameter extends Object
Parameter class represents a content type parameter.
| Constructor and Description |
|---|
Parameter()
Instantiates a new parameter.
|
Parameter(String name,
String value)
Instantiates a new parameter by setting its name and value.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(List<Parameter> params1,
List<Parameter> params2)
Checks if two arrays of parameters are equal.
|
boolean |
equals(Object obj) |
String |
getName()
Returns the name of the parameter.
|
String |
getValue()
Returns the value of the parameter.
|
int |
hashCode() |
static int |
hashCode(List<Parameter> parameters)
Returns the hash code of an array of parameters.
|
boolean |
isOptional()
Returns the isOptional value.
|
static boolean |
parameterExist(Parameter paramtofind,
List<Parameter> inparameters)
Checks if the paramtofind exists in inparameters array.
|
static boolean |
parameterNameExist(String parameterName,
Parameter[] parametersToSearch)
Checks if the parameter name exists in parametersToSearch array.
|
void |
setName(String name)
Sets the name of the parameter.
|
void |
setOptional(boolean isOptional)
Sets the isOptional value.
|
void |
setValue(String value)
Sets the value of the parameter.
|
protected void |
toDOM(Element parent) |
String |
toString() |
public String getName()
public void setName(String name)
name - The name of the parameter.public String getValue()
public void setValue(String value)
value - The value of the parameter.public boolean equals(Object obj)
equals in class Objectobj - The object to be checked.Object.equals(java.lang.Object)public static boolean equals(List<Parameter> params1, List<Parameter> params2)
params1 - The first array.params2 - The second array.public static boolean parameterExist(Parameter paramtofind, List<Parameter> inparameters)
paramtofind - The parameter to be found.inparameters - The array in which the paramtofind is searched in.public static boolean parameterNameExist(String parameterName, Parameter[] parametersToSearch)
parameterName - The parameter name to be foundparametersToSearch - The array in which the parameterName is searched in.public boolean isOptional()
public void setOptional(boolean isOptional)
isOptional - the isOptional value.public int hashCode()
hashCode in class ObjectObject.hashCode()public static int hashCode(List<Parameter> parameters)
parameters - The parameters from which the hash code is created.protected void toDOM(Element parent)
public String toString()
toString in class ObjectObject.toString()Copyright © 2014. All Rights Reserved.