[New] Added ListParameter.size() method

This commit is contained in:
Robert von Burg 2017-05-25 19:15:52 +02:00
parent 928d7e94ee
commit b8452dc6e4
5 changed files with 27 additions and 0 deletions

View File

@ -116,6 +116,11 @@ public class FloatListParameter extends AbstractParameter<List<Double>> implemen
return this.value.isEmpty();
}
@Override
public int size() {
return this.value.size();
}
@Override
public boolean contains(Double value) {
return this.value.contains(value);

View File

@ -116,6 +116,11 @@ public class IntegerListParameter extends AbstractParameter<List<Integer>> imple
return this.value.isEmpty();
}
@Override
public int size() {
return this.value.size();
}
@Override
public boolean contains(Integer value) {
return this.value.contains(value);

View File

@ -56,6 +56,13 @@ public interface ListParameter<E> extends Parameter<List<E>> {
* @returns true if the list of values is empty, false if not
*/
public boolean isEmpty();
/**
* Returns the size of the list of values
*
* @returns the size of the list of values
*/
public int size();
/**
* Returns true if the list of values contains the given element, false if not

View File

@ -116,6 +116,11 @@ public class LongListParameter extends AbstractParameter<List<Long>> implements
return this.value.isEmpty();
}
@Override
public int size() {
return this.value.size();
}
@Override
public boolean contains(Long value) {
return this.value.contains(value);

View File

@ -116,6 +116,11 @@ public class StringListParameter extends AbstractParameter<List<String>> impleme
return this.value.isEmpty();
}
@Override
public int size() {
return this.value.size();
}
@Override
public boolean contains(String value) {
return this.value.contains(value);