public interface IArraySlice<T> extends Iterable<T>
Modifier and Type | Method and Description |
---|---|
T[] |
array()
The backing array.
|
T |
get(int pos)
Absolute get of a value at an index.
|
void |
get(int srcoff,
T[] dst)
Absolute bulk get copies
dst.length values
from the specified offset into the slice defined by this buffer into the
caller's array. |
void |
get(int srcoff,
T[] dst,
int dstoff,
int dstlen)
Absolute bulk get copies the specified slice of values
from this buffer into the specified slice of the caller's array.
|
int |
len()
The length of the slice in the
array() . |
int |
off()
The start of the slice in the
array() . |
void |
put(int pos,
T v)
Absolute put of a value at an index.
|
void |
put(int pos,
T[] src)
Absolute bulk put copies all values in the caller's array into
this buffer starting at the specified position within the slice defined
by this buffer.
|
void |
put(int dstoff,
T[] src,
int srcoff,
int srclen)
Absolute bulk put copies the specified slice of values
from the caller's array into this buffer starting at the specified
position within the slice defined by this buffer.
|
IArraySlice<T> |
slice(int off,
int len)
Return a slice of the backing buffer.
|
T[] |
toArray()
Return a copy of the data in the slice.
|
T[] array()
int off()
array()
.int len()
array()
.T[] toArray()
IArraySlice<T> slice(int off, int len)
array()
, even when the buffer is extended and
the array reference is replaced.off
- The starting offset into the backing buffer of the slice.len
- The length of that slice.void put(int pos, T v)
pos
- The index.v
- The value.T get(int pos)
pos
- The index.void put(int pos, T[] src)
pos
- The starting position within the slice defined by this buffer.src
- The source data.void put(int dstoff, T[] src, int srcoff, int srclen)
dstoff
- The offset into the slice to which the data will be copied.src
- The source data.srcoff
- The offset of the 1st value in the source data to
be copied.srclen
- The #of values to be copied.void get(int srcoff, T[] dst)
dst.length
values
from the specified offset into the slice defined by this buffer into the
caller's array.srcoff
- The offset into the slice of the first value to be copied.dst
- The array into which the data will be copied.void get(int srcoff, T[] dst, int dstoff, int dstlen)
srcoff
- The offset into the slice defined by this buffer of the first
value to be copied.dst
- The array into which the data will be copied.dstoff
- The offset of the first value in that array onto
which the data will be copied.dstlen
- The #of values to be copied.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.