本文整理匯總了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())});
}
}