Beispiel #1
0
 @Test
 public void attributeIn() {
   MutableList<String> upperList = Lists.fixedSize.of("A", "B");
   Assert.assertTrue(
       Predicates2.attributeIn(StringFunctions.toUpperCase()).accept("a", upperList));
   Assert.assertFalse(
       Predicates2.attributeIn(StringFunctions.toUpperCase()).accept("c", upperList));
   MutableList<String> lowerList = Lists.fixedSize.of("a", "c");
   MutableList<String> newList =
       ListIterate.filterWith(
           lowerList, Predicates2.attributeIn(StringFunctions.toUpperCase()), upperList);
   Assert.assertEquals(FastList.newListWith("a"), newList);
 }