T
- type class. This is a marker parameter that is not reflected in the signatures, but can be respected by
methods requiring type information.public interface ArrayWritable<T>
Collection.toArray(Object[])
method in the following way: offset > 0
.num < size()
is unspecified.Modifier and Type | Method and Description |
---|---|
int |
size()
The size of this container.
|
void |
writeToArray(int offset,
@Nullable Object[] array,
int tgtOfs,
int num)
Writes the contents of this container to an array.
|
void writeToArray(int offset, @Nullable Object[] array, int tgtOfs, int num)
System.arraycopy(this.toArray(), offset, array, tgtOfs, num);
offset
- how many elements of this container to skip.array
- the array in which to store the elements.tgtOfs
- the starting offset in the target array.num
- the maximum number of elements to copy.int size()
Copyright © 2020. All rights reserved.