本文整理汇总了Java中org.apache.commons.collections4.IterableUtils.forEach方法的典型用法代码示例。如果您正苦于以下问题:Java IterableUtils.forEach方法的具体用法?Java IterableUtils.forEach怎么用?Java IterableUtils.forEach使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections4.IterableUtils
的用法示例。
在下文中一共展示了IterableUtils.forEach方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testUpdateGHZ5WithJapan
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testUpdateGHZ5WithJapan() throws Exception {
// setup
when(settings.getCountryCode()).thenReturn(Locale.JAPAN.getCountry());
when(settings.getWiFiBand()).thenReturn(WiFiBand.GHZ5);
when(settings.getSortBy()).thenReturn(SortBy.CHANNEL);
// execute
fixture.update(WiFiData.EMPTY);
// validate
verify(layout).setVisibility(View.VISIBLE);
IterableUtils.forEach(views.keySet(), new PairClosure());
verify(settings).getCountryCode();
verify(settings, times(2)).getWiFiBand();
verify(settings).getSortBy();
}
示例2: testNavigationMenuView
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testNavigationMenuView() throws Exception {
// execute
Menu menu = navigationView.getMenu();
// validate
assertEquals(NavigationMenu.values().length, menu.size());
IterableUtils.forEach(EnumUtils.values(NavigationGroup.class), new NavigationGroupClosure(menu));
}
示例3: testOrdinals
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testOrdinals() throws Exception {
// setup
Set<TestObject> expected = EnumUtils.values(TestObject.class);
// execute
Set<String> actual = EnumUtils.ordinals(TestObject.class);
// validate
assertEquals(expected.size(), actual.size());
IterableUtils.forEach(expected, new OrdinalsClosure(actual));
}
示例4: testRemovingAllWillNotRemoveLast
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testRemovingAllWillNotRemoveLast() throws Exception {
// setup
Set<Security> values = EnumUtils.values(Security.class);
// execute
IterableUtils.forEach(values, new ToggleClosure());
// validate
IterableUtils.forEachButLast(values, new RemovedClosure());
assertTrue(fixture.contains(IterableUtils.get(values, values.size() - 1)));
}
示例5: addSeriesData
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
Set<WiFiDetail> addSeriesData(@NonNull GraphViewWrapper graphViewWrapper, @NonNull List<WiFiDetail> wiFiDetails, int levelMax) {
Set<WiFiDetail> inOrder = new TreeSet<>(wiFiDetails);
IterableUtils.forEach(inOrder, new AddDataClosure(graphViewWrapper, levelMax));
adjustData(graphViewWrapper, inOrder);
Set<WiFiDetail> result = getNewSeries(inOrder);
xValue++;
if (scanCount < GraphConstants.MAX_SCAN_COUNT) {
scanCount++;
}
if (scanCount == 2) {
graphViewWrapper.setHorizontalLabelsVisible(true);
}
return result;
}
示例6: testChannelsAustraliaCanada
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testChannelsAustraliaCanada() throws Exception {
SortedSet<Integer> exclude = new TreeSet<>(Arrays.asList(120, 124, 128));
int expectedSize = CHANNELS_SET1.size() + CHANNELS_SET2.size() + CHANNELS_SET3.size() - exclude.size();
List<String> countries = Arrays.asList("AU", "CA");
IterableUtils.forEach(countries, new ChannelCanadaClosure(expectedSize, exclude));
}
示例7: testChannelsOther
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testChannelsOther() throws Exception {
int expectedSize = CHANNELS_SET1.size() + CHANNELS_SET2.size() + CHANNELS_SET3.size();
List<String> countries = Arrays.asList("US", "RU", "XYZ");
IterableUtils.forEach(countries, new ChannelOtherClosure(expectedSize));
}
示例8: testChannelsForUSAndSimilar
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testChannelsForUSAndSimilar() throws Exception {
List<String> countries = Arrays.asList("AS", "AU", "CA", "FM", "GU", "MP", "PA", "PR", "UM", "US", "VI");
IterableUtils.forEach(countries, new ChannelUSClosure());
}
示例9: populateNavigationMenu
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
private void populateNavigationMenu() {
IterableUtils.forEach(EnumUtils.values(NavigationGroup.class), new NavigationGroupClosure(navigationView.getMenu()));
}
示例10: addGraphViews
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
private void addGraphViews(View view, ChannelGraphAdapter channelGraphAdapter) {
IterableUtils.forEach(channelGraphAdapter.getGraphViews(),
new GraphViewAdd((ViewGroup) view.findViewById(R.id.graphFlipper)));
}
示例11: testMapping
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testMapping() throws Exception {
Set<WiFiBand> wiFiBands = EnumUtils.values(WiFiBand.class);
assertEquals(wiFiBands.size(), WiFiBandFilter.ids.size());
IterableUtils.forEach(wiFiBands, new MappingClosure());
}
示例12: removeSeries
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
public void removeSeries(@NonNull Set<WiFiDetail> newSeries) {
IterableUtils.forEach(seriesCache.remove(differenceSeries(newSeries)), new RemoveClouser());
}
示例13: getWiFiChannels
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
public List<WiFiChannel> getWiFiChannels() {
List<WiFiChannel> results = new ArrayList<>();
IterableUtils.forEach(wiFiChannelPairs, new WiFiChannelClosure(results));
return results;
}
示例14: testChannelsJapanTurkeySouthAfrica
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
@Test
public void testChannelsJapanTurkeySouthAfrica() throws Exception {
int expectedSize = CHANNELS_SET1.size() + CHANNELS_SET2.size();
List<String> countries = Arrays.asList("JP", "TR", "ZA");
IterableUtils.forEach(countries, new ChannelJapanClosure(expectedSize));
}
示例15: addGraphViews
import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
private void addGraphViews(View view, TimeGraphAdapter timeGraphAdapter) {
IterableUtils.forEach(timeGraphAdapter.getGraphViews(),
new GraphViewAdd((ViewGroup) view.findViewById(R.id.graphFlipper)));
}