@Override public FloatList visitFloatList(FloatList mine, FloatList other) { if (!mine.equals(other)) { throw NOT_EQUALS; } return mine; }
@Override public FloatList visitFloatList(FloatList mine, FloatList 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 FloatList mutableCopyWithCapacity(int capacity) { if (capacity < size) { throw new IllegalArgumentException(); } return new FloatArrayList(LegacyUtil.copyOf(array, capacity), size); }
@Override public FloatList mutableCopyWithCapacity(int capacity) { if (capacity < size) { throw new IllegalArgumentException(); } return new FloatArrayList(Arrays.copyOf(array, capacity), size); }
protected static FloatList newFloatList() { return new FloatArrayList(); }
protected static FloatList newFloatList(List<Float> toCopy) { return new FloatArrayList(toCopy); }
protected static FloatList emptyFloatList() { return FloatArrayList.emptyList(); }
protected static FloatList mutableCopy(FloatList list) { int size = list.size(); return list.mutableCopyWithCapacity( size == 0 ? AbstractProtobufList.DEFAULT_CAPACITY : size * 2); }
@Override public FloatList visitFloatList(FloatList mine, FloatList other) { hashCode = (53 * hashCode) + mine.hashCode(); return mine; }
FloatList visitFloatList(FloatList mine, FloatList other);