public class ArrayRef<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ArrayRef.Allocator<T> |
Constructor and Description |
---|
ArrayRef() |
ArrayRef(ArrayRef<T> src) |
ArrayRef(ArrayRef<T> src,
ArrayRef.Allocator<T> allocator) |
ArrayRef(ArrayRef<T> src,
int off,
int len) |
ArrayRef(ArrayRef<T> src,
int off,
int len,
ArrayRef.Allocator<T> allocator) |
ArrayRef(int capacity,
ArrayRef.Allocator<T> allocator) |
ArrayRef(T src,
int off,
int len) |
ArrayRef(T src,
int off,
int len,
ArrayRef.Allocator<T> allocator) |
Modifier and Type | Method and Description |
---|---|
void |
advance(int incr) |
protected T |
allocBuffer(int capacity) |
T |
buffer() |
boolean |
canEqual(Object obj) |
protected int |
capacity() |
ArrayRef<T> |
clear() |
static <T> void |
copy(ArrayRef<T> src,
int src_off,
ArrayRef<T> dst,
int dst_off,
int len) |
void |
copyIn(T src_buf,
int src_off,
int len) |
void |
copyIn(T src_buf,
int src_off,
int off,
int len) |
void |
copyOut(int off,
T dst_buf,
int dst_off,
int len) |
void |
copyOut(T dst_buf,
int dst_off) |
ArrayRef<T> |
ensureCapacity(int capacity) |
ArrayRef<T> |
ensureSpareCapacity(int spareCapacity) |
boolean |
equals(Object obj)
Note that since this class is basically a glorified pointer, the Equals method merely checks that they both point to
the same memory location.
|
protected static <T> T |
getBuffer(ArrayRef<T> ref) |
protected static <T> int |
getOffset(ArrayRef<T> ref) |
protected static <T> int |
getOffset(ArrayRef<T> ref,
int off) |
protected static <T> int |
getSize(ArrayRef<T> ref) |
int |
hashCode() |
void |
incrementSize(int len) |
int |
limit() |
int |
offset() |
int |
offset(int off) |
ArrayRef<T> |
set(ArrayRef<T> src) |
ArrayRef<T> |
set(ArrayRef<T> src,
int off) |
ArrayRef<T> |
set(ArrayRef<T> src,
int off,
int len) |
ArrayRef<T> |
set(T src) |
ArrayRef<T> |
set(T buf,
int off,
int len) |
void |
setSize(int len) |
int |
size() |
protected int |
spareCapacity() |
T |
toArray() |
T |
toArray(boolean nocopy) |
T |
toArray(int off,
int len) |
T |
toArray(int off,
int len,
boolean nocopy) |
String |
toString() |
protected int |
totalBufferSize() |
protected int |
totalBufferSize(T buf) |
public ArrayRef()
public ArrayRef(T src, int off, int len)
public ArrayRef(ArrayRef<T> src, ArrayRef.Allocator<T> allocator)
public ArrayRef(ArrayRef<T> src, int off, int len, ArrayRef.Allocator<T> allocator)
public ArrayRef(T src, int off, int len, ArrayRef.Allocator<T> allocator)
public ArrayRef(int capacity, ArrayRef.Allocator<T> allocator)
public final int size()
public final int offset()
public final T buffer()
public final void setSize(int len)
public final int offset(int off)
public final int limit()
protected final int capacity()
protected final int spareCapacity()
public final void incrementSize(int len)
public T toArray()
public T toArray(boolean nocopy)
public T toArray(int off, int len)
protected int totalBufferSize()
protected int totalBufferSize(T buf)
protected T allocBuffer(int capacity)
public void copyIn(T src_buf, int src_off, int off, int len)
public void copyIn(T src_buf, int src_off, int len)
public void copyOut(int off, T dst_buf, int dst_off, int len)
public void copyOut(T dst_buf, int dst_off)
public static <T> void copy(ArrayRef<T> src, int src_off, ArrayRef<T> dst, int dst_off, int len)
public T toArray(int off, int len, boolean nocopy)
public boolean equals(Object obj)
public boolean canEqual(Object obj)
public void advance(int incr)
protected static <T> T getBuffer(ArrayRef<T> ref)
protected static <T> int getSize(ArrayRef<T> ref)
protected static <T> int getOffset(ArrayRef<T> ref)
protected static <T> int getOffset(ArrayRef<T> ref, int off)
Copyright 2010-2018 Grey Software (Yusef Badri). All Rights Reserved.