@Test public void trimShouldReturnSameList() { List<String> list = asList("foo", "bar", "foobar"); assertThat(trim(list, 3), is(list)); }
static <T> List<T> trim(List<T> items, final int limit) { if (items.size() > limit) { items = items.subList(0, limit); } return items; }
AssetsResourceSupport extends ComponentSupport { static <T> List<T> trim(List<T> items, final int limit) { if (items.size() > limit) { items = items.subList(0, limit); } return items; } }
AssetsResourceSupport extends ComponentSupport { static <T> List<T> trim(List<T> items, final int limit) { if (items.size() > limit) { items = items.subList(0, limit); } return items; } AssetsResourceSupport(final ContentAuthHelper contentAuthHelper); }
AssetsResourceSupport extends ComponentSupport { static <T> List<T> trim(List<T> items, final int limit) { if (items.size() > limit) { items = items.subList(0, limit); } return items; } AssetsResourceSupport(final ContentAuthHelper contentAuthHelper);  }
AssetsResourceSupport extends ComponentSupport { static <T> List<T> trim(List<T> items, final int limit) { if (items.size() > limit) { items = items.subList(0, limit); } return items; } AssetsResourceSupport(final ContentAuthHelper contentAuthHelper);   }