本文整理汇总了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);
}
示例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());
}
示例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());
}
示例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())});
}
}