Removed overloads of setProperty
This commit is contained in:
@ -133,23 +133,9 @@ public abstract class AbstractPropertySource implements PropertySource {
|
||||
|
||||
|
||||
@Override
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value) {
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V... values) {
|
||||
checkValidPropertyDescriptor(propertyDescriptor);
|
||||
propertyValuesByDescriptor.put(propertyDescriptor, Collections.singletonList(value));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value1, V value2) {
|
||||
checkValidPropertyDescriptor(propertyDescriptor);
|
||||
propertyValuesByDescriptor.put(propertyDescriptor, Collections.unmodifiableList(Arrays.asList(value1, value2)));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value1, V value2, V... values) {
|
||||
checkValidPropertyDescriptor(propertyDescriptor);
|
||||
propertyValuesByDescriptor.put(propertyDescriptor, Collections.unmodifiableList(Arrays.asList(value1, value2, values)));
|
||||
propertyValuesByDescriptor.put(propertyDescriptor, Collections.unmodifiableList(Arrays.asList(values)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,37 +66,14 @@ public interface PropertySource {
|
||||
<T> void setProperty(PropertyDescriptor<T> propertyDescriptor, T value);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of a multi value property descriptor with only one argument.
|
||||
*
|
||||
* @param propertyDescriptor The property descriptor for which to add a value
|
||||
* @param value Value
|
||||
* @param <V> The type of the values
|
||||
*/
|
||||
<V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of a multi value property descriptor with two arguments.
|
||||
*
|
||||
* @param propertyDescriptor The property descriptor for which to add a value
|
||||
* @param value1 First value
|
||||
* @param value2 Second value
|
||||
* @param <V> The type of the values
|
||||
*/
|
||||
<V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value1, V value2);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of a multi value property descriptor with a variable number of arguments.
|
||||
*
|
||||
* @param propertyDescriptor The property descriptor for which to add a value
|
||||
* @param value1 First value
|
||||
* @param value2 Second value
|
||||
* @param values Rest of the values
|
||||
* @param values Values
|
||||
* @param <V> The type of the values
|
||||
*/
|
||||
<V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value1, V value2, V... values);
|
||||
<V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V... values);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -209,20 +209,8 @@ public abstract class AbstractDelegateRule implements Rule {
|
||||
|
||||
|
||||
@Override
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value) {
|
||||
rule.setProperty(propertyDescriptor, value);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value1, V value2) {
|
||||
rule.setProperty(propertyDescriptor, value1, value2);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V value1, V value2, V... values) {
|
||||
rule.setProperty(propertyDescriptor, value1, value2, values);
|
||||
public <V> void setProperty(MultiValuePropertyDescriptor<V> propertyDescriptor, V... values) {
|
||||
rule.setProperty(propertyDescriptor, values);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user