[New] Added GroupedParameterizedElement.removeRelation()
This commit is contained in:
parent
d61365f0ff
commit
32662678e7
|
@ -829,6 +829,19 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
||||||
return bag.removeParameter(paramKey);
|
return bag.removeParameter(paramKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <U, T extends Parameter<U>> T removeRelation(String paramKey) {
|
||||||
|
assertNotReadonly();
|
||||||
|
if (this.parameterBagMap == null)
|
||||||
|
return null;
|
||||||
|
ParameterBag bag = this.parameterBagMap.get(BAG_RELATIONS);
|
||||||
|
if (bag == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bag.removeParameter(paramKey);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <U, T extends Parameter<U>> T removeParameter(String bagKey, String paramKey) {
|
public <U, T extends Parameter<U>> T removeParameter(String bagKey, String paramKey) {
|
||||||
assertNotReadonly();
|
assertNotReadonly();
|
||||||
|
|
|
@ -1491,6 +1491,17 @@ public interface ParameterBagContainer extends StrolchElement {
|
||||||
*/
|
*/
|
||||||
<U, T extends Parameter<U>> T removeParameter(String paramKey);
|
<U, T extends Parameter<U>> T removeParameter(String paramKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the {@link Parameter} with the given paramKey from the {@link ParameterBag} with the key {@link
|
||||||
|
* StrolchModelConstants#BAG_RELATIONS}
|
||||||
|
*
|
||||||
|
* @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
|
||||||
|
*/
|
||||||
|
<U, T extends Parameter<U>> T removeRelation(String paramKey);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the {@link Parameter} with the given paramKey from the {@link ParameterBag} with the given bagKey
|
* Removes the {@link Parameter} with the given paramKey from the {@link ParameterBag} with the given bagKey
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue