The list of methods to do List Size are organized into topic(s).
double[]
getSize(List positions) get Size
if (positions.size() > 0) {
int[] min = getExtremeCoords(positions, true);
int[] max = getExtremeCoords(positions, false);
double[] result = new double[min.length];
for (int i = 0; i < min.length; i++) {
result[i] = (float) (max[i] - min[i] + 1) * 0.5f;
return result;
...
int
getSize(List sourceList) get size of list
getSize(null) = 0; getSize({}) = 0; getSize({1}) = 1;
return sourceList == null ? 0 : sourceList.size();
Integer
sizeOf(List> l) This function always returns the size of a list; no matter if it is null, 0 or >0.
return l != null ? l.size() : 0;
int
sizeOfListMap(Map> map) Get the total number of elements in a map whose values are lists of elements.
int result = 0;
for (Map.Entry<T, List<U>> entry : map.entrySet())
result += entry.getValue().size();
return result;