31 package com.google.protobuf;
42 final class ProtobufLists {
43 private ProtobufLists() {}
45 public static <E> ProtobufList<E> emptyProtobufList() {
46 return ProtobufArrayList.emptyList();
49 public static <E> ProtobufList<E> mutableCopy(ProtobufList<E> list) {
50 int size = list.size();
52 size == 0 ? AbstractProtobufList.DEFAULT_CAPACITY :
size * 2);
55 public static BooleanList emptyBooleanList() {
56 return BooleanArrayList.emptyList();
59 public static BooleanList newBooleanList() {
60 return new BooleanArrayList();
63 public static IntList emptyIntList() {
64 return IntArrayList.emptyList();
67 public static IntList newIntList() {
68 return new IntArrayList();
71 public static LongList emptyLongList() {
72 return LongArrayList.emptyList();
75 public static LongList newLongList() {
76 return new LongArrayList();
79 public static FloatList emptyFloatList() {
80 return FloatArrayList.emptyList();
83 public static FloatList newFloatList() {
84 return new FloatArrayList();
87 public static DoubleList emptyDoubleList() {
88 return DoubleArrayList.emptyList();
91 public static DoubleList newDoubleList() {
92 return new DoubleArrayList();