// Is cache there?
if (!this.faxNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableFaxNumber> list = this.phoneBean.allFaxNumbers();
+ final List<DialableFaxNumber> faxNumbers = this.phoneBean.allFaxNumbers();
// Add all
- for (final Iterator<DialableFaxNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableFaxNumber next = iterator.next();
-
+ for (final DialableFaxNumber faxNumber : faxNumbers) {
// Add it to cache
- this.faxNumberCache.put(next.getPhoneId(), next);
+ this.faxNumberCache.put(faxNumber.getPhoneId(), faxNumber);
}
}
// Is cache there?
if (!this.landLineNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableLandLineNumber> list = this.phoneBean.allLandLineNumbers();
+ final List<DialableLandLineNumber> lineNumbers = this.phoneBean.allLandLineNumbers();
// Add all
- for (final Iterator<DialableLandLineNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableLandLineNumber next = iterator.next();
-
+ for (final DialableLandLineNumber lineNumber : lineNumbers) {
// Add it to cache
- this.landLineNumberCache.put(next.getPhoneId(), next);
+ this.landLineNumberCache.put(lineNumber.getPhoneId(), lineNumber);
}
}
// Is cache there?
if (!this.mobileNumberCache.iterator().hasNext()) {
// Get whole list
- final List<DialableMobileNumber> list = this.phoneBean.allMobileNumbers();
+ final List<DialableMobileNumber> mobileNumbers = this.phoneBean.allMobileNumbers();
// Add all
- for (final Iterator<DialableMobileNumber> iterator = list.iterator(); iterator.hasNext();) {
- // Get next element
- final DialableMobileNumber next = iterator.next();
-
+ for (final DialableMobileNumber mobileNumber : mobileNumbers) {
// Add it to cache
- this.mobileNumberCache.put(next.getPhoneId(), next);
+ this.mobileNumberCache.put(mobileNumber.getPhoneId(), mobileNumber);
}
}
}