本文整理汇总了Java中com.google.protobuf.Internal.LongList类的典型用法代码示例。如果您正苦于以下问题:Java LongList类的具体用法?Java LongList怎么用?Java LongList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LongList类属于com.google.protobuf.Internal包,在下文中一共展示了LongList类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitLongList
import com.google.protobuf.Internal.LongList; //导入依赖的package包/类
@Override
public LongList visitLongList(LongList mine, LongList other) {
if (!mine.equals(other)) {
throw NOT_EQUALS;
}
return mine;
}
示例2: mutableCopyWithCapacity
import com.google.protobuf.Internal.LongList; //导入依赖的package包/类
@Override
public LongList mutableCopyWithCapacity(int capacity) {
if (capacity < size) {
throw new IllegalArgumentException();
}
return new LongArrayList(LegacyUtil.copyOf(array, capacity), size);
}
示例3: mutableCopyWithCapacity
import com.google.protobuf.Internal.LongList; //导入依赖的package包/类
@Override
public LongList mutableCopyWithCapacity(int capacity) {
if (capacity < size) {
throw new IllegalArgumentException();
}
return new LongArrayList(Arrays.copyOf(array, capacity), size);
}
示例4: newLongList
import com.google.protobuf.Internal.LongList; //导入依赖的package包/类
protected static LongList newLongList() {
return new LongArrayList();
}
示例5: emptyLongList
import com.google.protobuf.Internal.LongList; //导入依赖的package包/类
protected static LongList emptyLongList() {
return LongArrayList.emptyList();
}
示例6: mutableCopy
import com.google.protobuf.Internal.LongList; //导入依赖的package包/类
protected static LongList mutableCopy(LongList list) {
int size = list.size();
return list.mutableCopyWithCapacity(
size == 0 ? AbstractProtobufList.DEFAULT_CAPACITY : size * 2);
}