当前位置: 首页>>代码示例>>Java>>正文


Java IterableUtils.forEach方法代码示例

本文整理汇总了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();
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:16,代码来源:ChannelGraphNavigationTest.java

示例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));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:9,代码来源:NavigationMenuViewTest.java

示例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));

}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:12,代码来源:EnumUtilsTest.java

示例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)));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:11,代码来源:SecurityAdapterTest.java

示例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;
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:15,代码来源:DataManager.java

示例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));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:8,代码来源:WiFiChannelCountryGHZ5Test.java

示例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));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:7,代码来源:WiFiChannelCountryGHZ5Test.java

示例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());
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:6,代码来源:WiFiChannelCountryGHZ2Test.java

示例9: populateNavigationMenu

import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
private void populateNavigationMenu() {
    IterableUtils.forEach(EnumUtils.values(NavigationGroup.class), new NavigationGroupClosure(navigationView.getMenu()));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:4,代码来源:NavigationMenuView.java

示例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)));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:5,代码来源:ChannelGraphFragment.java

示例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());
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:7,代码来源:WiFiBandFilterTest.java

示例12: removeSeries

import org.apache.commons.collections4.IterableUtils; //导入方法依赖的package包/类
public void removeSeries(@NonNull Set<WiFiDetail> newSeries) {
    IterableUtils.forEach(seriesCache.remove(differenceSeries(newSeries)), new RemoveClouser());
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:4,代码来源:GraphViewWrapper.java

示例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;
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:6,代码来源:WiFiChannels.java

示例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));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:7,代码来源:WiFiChannelCountryGHZ5Test.java

示例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)));
}
 
开发者ID:VREMSoftwareDevelopment,项目名称:WiFiAnalyzer,代码行数:5,代码来源:TimeGraphFragment.java


注:本文中的org.apache.commons.collections4.IterableUtils.forEach方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。