[Minor] Code formatting
This commit is contained in:
parent
6ae9cbf866
commit
c8cedae647
|
@ -67,7 +67,8 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
/**
|
||||
* Sets the type of this {@link GroupedParameterizedElement}
|
||||
*
|
||||
* @param type the type to set
|
||||
* @param type
|
||||
* the type to set
|
||||
*/
|
||||
public void setType(String type) {
|
||||
if (StringHelper.isEmpty(type)) {
|
||||
|
@ -83,8 +84,10 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
* Returns the {@link Parameter} with the given key from the {@link ParameterBag} with the given bagKey, or null if
|
||||
* the {@link Parameter} or the {@link ParameterBag} does not exist
|
||||
*
|
||||
* @param bagKey the key of the {@link ParameterBag} from which the {@link Parameter} is to be returned
|
||||
* @param paramKey the key of the {@link Parameter} which is to be returned
|
||||
* @param bagKey
|
||||
* the key of the {@link ParameterBag} from which the {@link Parameter} is to be returned
|
||||
* @param paramKey
|
||||
* the key of the {@link Parameter} which is to be returned
|
||||
*
|
||||
* @return the found {@link Parameter} or null if it was not found
|
||||
*/
|
||||
|
@ -103,10 +106,13 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
/**
|
||||
* Adds a new {@link Parameter} to the {@link ParameterBag} with the given key
|
||||
*
|
||||
* @param bagKey the key of the {@link ParameterBag} to which the {@link Parameter} should be added
|
||||
* @param parameter the {@link Parameter} to be added to the {@link ParameterBag}
|
||||
* @param bagKey
|
||||
* the key of the {@link ParameterBag} to which the {@link Parameter} should be added
|
||||
* @param parameter
|
||||
* the {@link Parameter} to be added to the {@link ParameterBag}
|
||||
*
|
||||
* @throws StrolchException if the {@link ParameterBag} does not exist
|
||||
* @throws StrolchException
|
||||
* if the {@link ParameterBag} does not exist
|
||||
*/
|
||||
public void addParameter(String bagKey, Parameter<?> parameter) throws StrolchException {
|
||||
if (this.parameterBagMap == null) {
|
||||
|
@ -125,8 +131,10 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
/**
|
||||
* Removes the {@link Parameter} with the given paramKey from the {@link ParameterBag} with the given bagKey
|
||||
*
|
||||
* @param bagKey the key of the {@link ParameterBag} from which the {@link Parameter} is to be removed
|
||||
* @param paramKey the key of the {@link Parameter} which is to be removed
|
||||
* @param bagKey
|
||||
* the key of the {@link ParameterBag} from which the {@link Parameter} is to be removed
|
||||
* @param paramKey
|
||||
* the key of the {@link Parameter} which is to be removed
|
||||
*
|
||||
* @return the removed {@link Parameter} or null if it did not exist
|
||||
*/
|
||||
|
@ -145,7 +153,8 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
/**
|
||||
* Returns the {@link ParameterBag} with the given key, or null if it does not exist
|
||||
*
|
||||
* @param key the key of the {@link ParameterBag} to return
|
||||
* @param key
|
||||
* the key of the {@link ParameterBag} to return
|
||||
*
|
||||
* @return the {@link ParameterBag} with the given key, or null if it does not exist
|
||||
*/
|
||||
|
@ -159,12 +168,18 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
/**
|
||||
* Adds the given {@link ParameterBag} to this {@link GroupedParameterizedElement}
|
||||
*
|
||||
* @param bag the {@link ParameterBag} to add
|
||||
* @param bag
|
||||
* the {@link ParameterBag} to add
|
||||
*/
|
||||
public void addParameterBag(ParameterBag bag) {
|
||||
if (this.parameterBagMap == null) {
|
||||
this.parameterBagMap = new HashMap<String, ParameterBag>();
|
||||
}
|
||||
|
||||
if (this.parameterBagMap.containsKey(bag.getId())) {
|
||||
String msg = "A ParameterBag already exists with id {0} on {1}";
|
||||
throw new StrolchException(MessageFormat.format(msg, bag.getId(), getLocator()));
|
||||
}
|
||||
this.parameterBagMap.put(bag.getId(), bag);
|
||||
bag.setParent(this);
|
||||
}
|
||||
|
@ -172,7 +187,8 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
/**
|
||||
* Removes the {@link ParameterBag} with the given key
|
||||
*
|
||||
* @param key the key of the {@link ParameterBag} to remove
|
||||
* @param key
|
||||
* the key of the {@link ParameterBag} to remove
|
||||
*
|
||||
* @return the removed {@link ParameterBag}, or null if it does not exist
|
||||
*/
|
||||
|
@ -195,7 +211,8 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
/**
|
||||
* Returns true if the {@link ParameterBag} with the given key exists on this {@link GroupedParameterizedElement}.
|
||||
*
|
||||
* @param bagKey the key of the {@link ParameterBag} which is to be checked for existence
|
||||
* @param bagKey
|
||||
* the key of the {@link ParameterBag} which is to be checked for existence
|
||||
* @return true if the {@link ParameterBag} with the given key exists on this {@link GroupedParameterizedElement}.
|
||||
*/
|
||||
public boolean hasParameterBag(String bagKey) {
|
||||
|
@ -206,12 +223,14 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
|||
* Returns true if the {@link Parameter} with the given paramKey exists on the {@link ParameterBag} with the given
|
||||
* bagKey
|
||||
*
|
||||
* @param bagKey the key of the {@link ParameterBag} on which to find the {@link Parameter}
|
||||
* @param paramKey the key of the {@link Parameter} to be found
|
||||
* @param bagKey
|
||||
* the key of the {@link ParameterBag} on which to find the {@link Parameter}
|
||||
* @param paramKey
|
||||
* the key of the {@link Parameter} to be found
|
||||
*
|
||||
* @return true if the {@link Parameter} with the given paramKey exists on the {@link ParameterBag} with the given
|
||||
* bagKey. False is returned if the {@link ParameterBag} does not exist, or the {@link Parameter} does not exist on
|
||||
* the {@link ParameterBag}
|
||||
* bagKey. False is returned if the {@link ParameterBag} does not exist, or the {@link Parameter} does not
|
||||
* exist on the {@link ParameterBag}
|
||||
*/
|
||||
public boolean hasParameter(String bagKey, String paramKey) {
|
||||
if (this.parameterBagMap == null) {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
package li.strolch.model;
|
||||
|
||||
import ch.eitchnet.utils.dbc.DBC;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -80,7 +81,8 @@ public abstract class ParameterizedElement extends AbstractStrolchElement {
|
|||
/**
|
||||
* Sets the type of this {@link ParameterizedElement}
|
||||
*
|
||||
* @param type the type to set
|
||||
* @param type
|
||||
* the type to set
|
||||
*/
|
||||
public void setType(String type) {
|
||||
if (StringHelper.isEmpty(type)) {
|
||||
|
@ -95,7 +97,8 @@ public abstract class ParameterizedElement extends AbstractStrolchElement {
|
|||
/**
|
||||
* Returns the {@link Parameter} with the given id, or null if it does not exist
|
||||
*
|
||||
* @param key the id of the parameter to return
|
||||
* @param key
|
||||
* the id of the parameter to return
|
||||
*
|
||||
* @return the {@link Parameter} with the given id, or null if it does not exist
|
||||
*/
|
||||
|
@ -110,12 +113,18 @@ public abstract class ParameterizedElement extends AbstractStrolchElement {
|
|||
/**
|
||||
* Adds the given {@link Parameter} to the {@link ParameterizedElement}
|
||||
*
|
||||
* @param parameter the {@link Parameter} to add
|
||||
* @param parameter
|
||||
* the {@link Parameter} to add
|
||||
*/
|
||||
public void addParameter(Parameter<?> parameter) {
|
||||
if (this.parameterMap == null) {
|
||||
this.parameterMap = new HashMap<String, Parameter<?>>();
|
||||
}
|
||||
|
||||
if (this.parameterMap.containsKey(parameter.getId())) {
|
||||
String msg = "A Parameter already exists with id {0} on {1}";
|
||||
throw new StrolchException(MessageFormat.format(msg, parameter.getId(), getLocator()));
|
||||
}
|
||||
this.parameterMap.put(parameter.getId(), parameter);
|
||||
parameter.setParent(this);
|
||||
}
|
||||
|
@ -123,7 +132,8 @@ public abstract class ParameterizedElement extends AbstractStrolchElement {
|
|||
/**
|
||||
* Removes the {@link Parameter} with the given key
|
||||
*
|
||||
* @param key the key of the {@link Parameter} to remove
|
||||
* @param key
|
||||
* the key of the {@link Parameter} to remove
|
||||
*
|
||||
* @return the removed {@link Parameter}, or null if it does not exist
|
||||
*/
|
||||
|
@ -159,7 +169,8 @@ public abstract class ParameterizedElement extends AbstractStrolchElement {
|
|||
/**
|
||||
* Returns true, if the {@link Parameter} exists with the given key, false otherwise
|
||||
*
|
||||
* @param key the key of the {@link Parameter} to check for
|
||||
* @param key
|
||||
* the key of the {@link Parameter} to check for
|
||||
*
|
||||
* @return true, if the {@link Parameter} exists with the given key, false otherwise
|
||||
*/
|
||||
|
@ -270,7 +281,8 @@ public abstract class ParameterizedElement extends AbstractStrolchElement {
|
|||
/**
|
||||
* Set the parent for this {@link ParameterizedElement}
|
||||
*
|
||||
* @param parent the parent to set
|
||||
* @param parent
|
||||
* the parent to set
|
||||
*/
|
||||
public void setParent(GroupedParameterizedElement parent) {
|
||||
this.parent = parent;
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
*/
|
||||
package li.strolch.model.parameter;
|
||||
|
||||
import li.strolch.model.Order;
|
||||
import li.strolch.model.ParameterizedElement;
|
||||
import li.strolch.model.Resource;
|
||||
import li.strolch.model.StrolchElement;
|
||||
import li.strolch.model.visitor.ParameterVisitor;
|
||||
|
||||
|
@ -37,18 +35,6 @@ public interface Parameter<T> extends StrolchElement {
|
|||
*/
|
||||
public static final String UOM_NONE = "None"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* This interpretation value indicates that the value of the {@link Parameter} should be understood as a reference
|
||||
* to a {@link Resource}
|
||||
*/
|
||||
public static final String INTERPRETATION_RESOURCE_REF = "Resource-Reference"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* This interpretation value indicates that the value of the {@link Parameter} should be understood as a reference
|
||||
* to a {@link Order}
|
||||
*/
|
||||
public static final String INTERPRETATION_ORDER_REF = "Order-Reference"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* the value of the parameter as string
|
||||
*
|
||||
|
@ -108,7 +94,8 @@ public interface Parameter<T> extends StrolchElement {
|
|||
/**
|
||||
* Set the index of this {@link Parameter}. This can be used to sort the parameters in a UI
|
||||
*
|
||||
* @param index the index to set
|
||||
* @param index
|
||||
* the index to set
|
||||
*/
|
||||
public void setIndex(int index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue