Lines Matching refs:fromList
146 List<String> fromList = Lists.newArrayList();
148 fromList.add("q" + checkNotNull(element));
150 return Lists.transform(fromList, removeFirst);
162 List<String> fromList = Lists.newLinkedList();
164 fromList.add("q" + checkNotNull(element));
166 return Lists.transform(fromList, removeFirst);
178 List<String> fromList = Lists.newArrayList(elements);
179 return Lists.transform(fromList, Functions.<String>identity());
191 List<String> fromList =
193 return Lists.transform(fromList, Functions.<String>identity());
489 List<Integer> fromList = Lists.newArrayList(SOME_LIST);
490 List<Integer> toList = Lists.reverse(fromList);
491 assertReverseView(fromList, toList);
495 List<Integer> fromList = Lists.newLinkedList(SOME_SEQUENTIAL_LIST);
496 List<Integer> toList = Lists.reverse(fromList);
497 assertReverseView(fromList, toList);
500 private static void assertReverseView(List<Integer> fromList,
502 /* fromList modifications reflected in toList */
503 fromList.set(0, 5);
505 fromList.add(6);
507 fromList.add(2, 9);
509 fromList.remove(Integer.valueOf(2));
511 fromList.remove(3);
514 /* toList modifications reflected in fromList */
516 assertEquals(asList(5, 9, 3), fromList);
518 assertEquals(asList(7, 5, 9, 3), fromList);
520 assertEquals(asList(5, 7, 5, 9, 3), fromList);
522 assertEquals(asList(5, 7, 9, 3), fromList);
524 assertEquals(asList(5, 7, 8, 3), fromList);
526 assertEquals(Collections.emptyList(), fromList);
601 List<Integer> fromList = Lists.newArrayList(SOME_LIST);
602 List<String> list = Lists.transform(fromList, SOME_FUNCTION);
607 List<Integer> fromList = Lists.newLinkedList(SOME_SEQUENTIAL_LIST);
608 List<String> list = Lists.transform(fromList, SOME_FUNCTION);
630 List<Integer> fromList = Lists.newArrayList(SOME_LIST);
631 List<String> toList = Lists.transform(fromList, SOME_FUNCTION);
632 assertTransformView(fromList, toList);
636 List<Integer> fromList = Lists.newLinkedList(SOME_SEQUENTIAL_LIST);
637 List<String> toList = Lists.transform(fromList, SOME_FUNCTION);
638 assertTransformView(fromList, toList);
641 private static void assertTransformView(List<Integer> fromList,
643 /* fromList modifications reflected in toList */
644 fromList.set(0, 5);
646 fromList.add(6);
648 fromList.remove(Integer.valueOf(2));
650 fromList.remove(2);
653 /* toList modifications reflected in fromList */
655 assertEquals(asList(5, 3), fromList);
657 assertEquals(asList(3), fromList);
659 assertEquals(Collections.emptyList(), fromList);
673 List<Integer> fromList = Lists.newArrayList(SOME_LIST);
674 List<String> list = Lists.transform(fromList, SOME_FUNCTION);
679 List<Integer> fromList = Lists.newLinkedList(SOME_SEQUENTIAL_LIST);
680 List<String> list = Lists.transform(fromList, SOME_FUNCTION);
739 List<Integer> fromList = Lists.newArrayList(SOME_LIST);
740 List<String> list = Lists.transform(fromList, SOME_FUNCTION);
745 List<Integer> fromList = Lists.newLinkedList(SOME_SEQUENTIAL_LIST);
746 List<String> list = Lists.transform(fromList, SOME_FUNCTION);