I learned that Advanced_For_Loop can take exactly two expressions. I don't know how it does work when it has three. I mean: for(expression1 : expression2 : expression3). And I don't know how it iterates in this code...
private Sheet fieldVsTime(Workbook wb, String _title,List<PivotField>
_pivots, List<PivotField> _all,boolean _periods,Map<String, String>
_yAxesMapping) {
for (PivotField pivot : _all == null ? _pivots : _all) {
List<PivotField> list = pivot.getPivot();
if (list != null) {
for (PivotField pivotField : list) {
int publishDate = Integer.parseInt(pivotField.getValue().toString());
if (_periods) {
publishDate = (publishDate / 10) * 10;
}
if (publishDate < minYear) {
minYear = publishDate;
}
if (publishDate > maxYear) {
maxYear = publishDate;
}
}
}
}