@Override public LongList visitLongList(LongList mine, LongList other) { if (!mine.equals(other)) { throw NOT_EQUALS; } return mine; }
@Override public LongList visitLongList(LongList mine, LongList other) { int size = mine.size(); int otherSize = other.size(); if (size > 0 && otherSize > 0) { if (!mine.isModifiable()) { mine = mine.mutableCopyWithCapacity(size + otherSize); } mine.addAll(other); } return size > 0 ? mine : other; }
@Override public LongList mutableCopyWithCapacity(int capacity) { if (capacity < size) { throw new IllegalArgumentException(); } return new LongArrayList(LegacyUtil.copyOf(array, capacity), size); }
@Override public LongList mutableCopyWithCapacity(int capacity) { if (capacity < size) { throw new IllegalArgumentException(); } return new LongArrayList(Arrays.copyOf(array, capacity), size); }
protected static LongList newLongList() { return new LongArrayList(); }
protected static LongList newLongList(List<Long> toCopy) { return new LongArrayList(toCopy); }
protected static LongList emptyLongList() { return LongArrayList.emptyList(); }
protected static LongList mutableCopy(LongList list) { int size = list.size(); return list.mutableCopyWithCapacity( size == 0 ? AbstractProtobufList.DEFAULT_CAPACITY : size * 2); }
@Override public LongList visitLongList(LongList mine, LongList other) { hashCode = (53 * hashCode) + mine.hashCode(); return mine; }
LongList visitLongList(LongList mine, LongList other);