工作for循環我有一個低於類名爲經紀人發票,以便如下所示 經紀人發票類有一個成員變量返回類型是陣列的如何使外for循環來對內部在Java
public class BrokerInvoice
{
private BrokerInvoiceLineItem[] lineItemsView;
}
public class BrokerInvoiceLineItem
{
}
現在下面是我在哪裏操縱如圖即我正在閱讀一個單個標籤練成片和填充所有事情在brokerInvoice對象,然後稍後現在該問題涉及如果取BrokerInvoiceLineItem
brokerInvoice = readinginvoiceimpl.findHeaderRowNumber(workbookXls, 0, brokerInvoiceLineItemList, brokerInvoice , brokerIdLong , finalfilteredfilename,dateType);
for (BrokerInvoiceLineItem item : brokerInvoice
.getLineItems()) {
if (item.getreaddeate() == null) {
throw new BOARuntimeException(
"readdeate is not there");
}
的值的片我我正在讀數據IPLE標籤delimeted Excel表格其中associaoted與brokerInvoice每個標籤的數據對象,因此最後我在一個名爲totalbrokerinvoiceobjects
//Reading multitabs sheets from excel workbook
for (int i = 0; i < workbookXls.getNumberOfSheets(); i++) {
List<BrokerInvoiceLineItem> brokerInvoiceLineItemList = new ArrayList<BrokerInvoiceLineItem>();
brokerInvoice = readinginvoiceimpl.findHeaderRowNumber(workbookXls, 0, brokerInvoiceLineItemList, brokerInvoice , brokerIdLong , finalfilteredfilename,dateType);
totalBrokerInvoiceObjects.add(brokerInvoice);
}
現在所有的經紀人發票對象在列表中指定totalBrokerInvoiceObjects一個seprate列表中添加他們現在請各位指教我怎樣才能perfor每個brokerInvoice對象的檢查,因爲我要檢查這個現在brokerInvoice.getLineItems())
對列表中的所有代理髮票對象命名totalBrokerInvoiceObjects
難道我開始外for循環首先將先取每個經紀人發票對象brokerInvoice對象檢查獲取訂單項,因爲我之前使用
你得到什麼錯誤?請花時間改進你的語法。 –
當然,我沒有得到一個錯誤,請告知列表totalbrokerinvoiceobjects裏面包含brokerinvoiceobjects我將如何檢查獲取行項目,因爲我以前做 – sss