CommonMatchersTest.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:protobuf-el 作者:
@Parameters(name = "{index}:immutable={1}")
public static Collection<Object[]> data() {
  return ImmutableList.of(
      //Mutable collections
      new Object[]{Lists.newArrayList(1, 2, 3), false},
      new Object[]{Sets.newHashSet("1", "2"), false},
      new Object[]{Collection.class.cast(Lists.newArrayList(true, false)), false},
      //Immutable collections
      new Object[]{ImmutableList.of(1, 2, 3), true},
      new Object[]{ImmutableSet.of("1", "2"), true},
      new Object[]{ImmutableSortedSet.of(1, 2, 3), true},
      new Object[]{ImmutableMultiset.of(1, 2, 3), true},
      new Object[]{Collection.class.cast(ImmutableList.of(true, false)), true},
      new Object[]{Collections.unmodifiableList(Lists.newArrayList(1, 2, 3)), true},
      new Object[]{Collections.unmodifiableSet(Sets.newHashSet("1", "2")), true},
      new Object[]{Collections.unmodifiableCollection(Lists.newArrayList(true, false)), true}
      );
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号