當前位置: 首頁>>代碼示例>>Java>>正文


Java IntHashSet.intIterator方法代碼示例

本文整理匯總了Java中com.gs.collections.impl.set.mutable.primitive.IntHashSet.intIterator方法的典型用法代碼示例。如果您正苦於以下問題:Java IntHashSet.intIterator方法的具體用法?Java IntHashSet.intIterator怎麽用?Java IntHashSet.intIterator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.gs.collections.impl.set.mutable.primitive.IntHashSet的用法示例。


在下文中一共展示了IntHashSet.intIterator方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testDeleteAllPreCachedInTransaction

import com.gs.collections.impl.set.mutable.primitive.IntHashSet; //導入方法依賴的package包/類
public void testDeleteAllPreCachedInTransaction() throws SQLException
{
    MithraTransaction tx = MithraManagerProvider.getMithraManager().startOrContinueTransaction();
    OrderList list = new OrderList(OrderFinder.userId().eq(1));
    IntHashSet deletedIds = new IntHashSet();
    for(int i=0;i<list.size();i++)
    {
        deletedIds.add(list.getOrderAt(i).getOrderId());
    }

    list.deleteAll();
    IntIterator it = deletedIds.intIterator();
    while(it.hasNext())
    {
        assertNull(OrderFinder.findOne(OrderFinder.orderId().eq(it.next())));
    }
    OrderList list2 = new OrderList(OrderFinder.userId().eq(1));
    assertEquals(0, list2.size());
    tx.commit();
    list2 = new OrderList(OrderFinder.userId().eq(1));
    assertEquals(0, list2.size());
    checkServerSideDeleted(deletedIds);
}
 
開發者ID:goldmansachs,項目名稱:reladomo,代碼行數:24,代碼來源:TestTransactionalClientPortal.java

示例2: testDeleteAllOneByOne

import com.gs.collections.impl.set.mutable.primitive.IntHashSet; //導入方法依賴的package包/類
public void testDeleteAllOneByOne() throws SQLException
{
    OrderList list = new OrderList(OrderFinder.all());

    OrderList toBeDeleted = new OrderList();

    IntHashSet deletedIds = new IntHashSet();
    for(int i=0;i<list.size();i+=2) // delete every other one
    {
        toBeDeleted.add(list.get(i));
        deletedIds.add(list.getOrderAt(i).getOrderId());
    }

    toBeDeleted.deleteAll();
    IntIterator it = deletedIds.intIterator();
    while(it.hasNext())
    {
        this.checkOrderDoesNotExist(it.next());
    }
    OrderList list2 = new OrderList(OrderFinder.all());
    assertEquals(list.size() - deletedIds.size(), list2.size());
}
 
開發者ID:goldmansachs,項目名稱:reladomo,代碼行數:23,代碼來源:TestTransactionalList.java

示例3: testDeleteAllPreCached

import com.gs.collections.impl.set.mutable.primitive.IntHashSet; //導入方法依賴的package包/類
public void testDeleteAllPreCached() throws SQLException
{
    OrderList list = new OrderList(OrderFinder.userId().eq(1));

    IntHashSet deletedIds = new IntHashSet();
    for(int i=0;i<list.size();i++)
    {
        deletedIds.add(list.getOrderAt(i).getOrderId());
    }

    list.deleteAll();
    IntIterator it = deletedIds.intIterator();
    while(it.hasNext())
    {
        this.checkOrderDoesNotExist(it.next());
    }
    OrderList list2 = new OrderList(OrderFinder.userId().eq(1));
    assertEquals(0, list2.size());
}
 
開發者ID:goldmansachs,項目名稱:reladomo,代碼行數:20,代碼來源:TestTransactionalList.java

示例4: checkServerSideDeleted

import com.gs.collections.impl.set.mutable.primitive.IntHashSet; //導入方法依賴的package包/類
private void checkServerSideDeleted(IntHashSet deletedIds)
{
    IntIterator it = deletedIds.intIterator();
    while(it.hasNext())
    {
        this.getRemoteSlaveVm().executeMethod("serverCheckOrderDoesNotExist", new Class[] { int.class} , new Object[] { new Integer(it.next())});
    }
}
 
開發者ID:goldmansachs,項目名稱:reladomo,代碼行數:9,代碼來源:TestTransactionalClientPortal.java


注:本文中的com.gs.collections.impl.set.mutable.primitive.IntHashSet.intIterator方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。