当前位置: 首页>>代码示例>>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;未经允许,请勿转载。