本文整理匯總了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);
}