|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.image.DataBuffer
java.awt.image.DataBufferDouble
public final class DataBufferDouble
A DataBuffer that uses an array of double primitives
to represent each of its banks.
| Field Summary |
|---|
| Fields inherited from class java.awt.image.DataBuffer |
|---|
banks, dataType, offset, offsets, size, TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT |
| Constructor Summary | |
|---|---|
DataBufferDouble(double[][] dataArray,
int size)
Creates a new data buffer backed by the specified data banks. |
|
DataBufferDouble(double[][] dataArray,
int size,
int[] offsets)
Creates a new data buffer backed by the specified data banks, with the specified offsets to the first element in each bank. |
|
DataBufferDouble(double[] dataArray,
int size)
Creates a new data buffer backed by the specified data bank. |
|
DataBufferDouble(double[] dataArray,
int size,
int offset)
Creates a new data buffer backed by the specified data bank, with the specified offset to the first element. |
|
DataBufferDouble(int size)
Creates a new data buffer with a single data bank containing the specified number of double elements. |
|
DataBufferDouble(int size,
int numBanks)
Creates a new data buffer with the specified number of data banks, each containing the specified number of double elements. |
|
| Method Summary | |
|---|---|
double[][] |
getBankData()
Returns the array underlying this DataBuffer. |
double[] |
getData()
Returns the first data bank. |
double[] |
getData(int bank)
Returns a data bank. |
int |
getElem(int i)
Returns an element from the first data bank. |
int |
getElem(int bank,
int i)
Returns an element from a particular data bank. |
double |
getElemDouble(int i)
Returns an element from the first data bank, converted to a double. |
double |
getElemDouble(int bank,
int i)
Returns an element from a particular data bank, converted to a double. |
float |
getElemFloat(int i)
Returns an element from the first data bank, converted to a float. |
float |
getElemFloat(int bank,
int i)
Returns an element from a particular data bank, converted to a float. |
void |
setElem(int i,
int val)
Sets an element in the first data bank. |
void |
setElem(int bank,
int i,
int val)
Sets an element in a particular data bank. |
void |
setElemDouble(int i,
double val)
Sets an element in the first data bank. |
void |
setElemDouble(int bank,
int i,
double val)
Sets an element in a particular data bank. |
void |
setElemFloat(int i,
float val)
Sets an element in the first data bank. |
void |
setElemFloat(int bank,
int i,
float val)
Sets an element in a particular data bank. |
| Methods inherited from class java.awt.image.DataBuffer |
|---|
getDataType, getDataTypeSize, getNumBanks, getOffset, getOffsets, getSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataBufferDouble(int size)
double elements.
size - the number of elements in the data bank.
public DataBufferDouble(int size,
int numBanks)
double elements.
size - the number of elements in the data bank.numBanks - the number of data banks.
public DataBufferDouble(double[] dataArray,
int size)
Note: there is no exception when dataArray is
null, but in that case an exception will be thrown
later if you attempt to access the data buffer.
dataArray - the data bank.size - the number of elements in the data bank.
public DataBufferDouble(double[] dataArray,
int size,
int offset)
Note: there is no exception when dataArray is
null, but in that case an exception will be thrown
later if you attempt to access the data buffer.
dataArray - the data bank.size - the number of elements in the data bank.offset - the offset to the first element in the array.
public DataBufferDouble(double[][] dataArray,
int size)
dataArray - the data banks.size - the number of elements in the data bank.
NullPointerException - if dataArray is
null.
public DataBufferDouble(double[][] dataArray,
int size,
int[] offsets)
dataArray - the data banks.size - the number of elements in the data bank.offsets - the offsets to the first element in each data bank.
NullPointerException - if dataArray is
null.| Method Detail |
|---|
public double[] getData()
public double[] getData(int bank)
bank - the bank index.
public double[][] getBankData()
DataBuffer.
public int getElem(int i)
i before accessing the
underlying data array.
getElem in class DataBufferi - the element index.
public int getElem(int bank,
int i)
i before accessing the
underlying data array.
getElem in class DataBufferbank - the bank index.i - the element index.
public void setElem(int i,
int val)
i before updating the underlying
data array.
setElem in class DataBufferi - the element index.val - the new element value.
public void setElem(int bank,
int i,
int val)
i before updating the underlying
data array.
setElem in class DataBufferbank - the data bank index.i - the element index.val - the new element value.public float getElemFloat(int i)
DataBufferfloat. The offset (specified in the constructor) is added
to i before accessing the underlying data array.
getElemFloat in class DataBufferi - the element index.
public float getElemFloat(int bank,
int i)
DataBufferfloat. The offset (specified in the constructor) is
added to i before accessing the underlying data array.
getElemFloat in class DataBufferbank - the bank index.i - the element index.
public void setElemFloat(int i,
float val)
DataBufferi before updating the underlying
data array.
setElemFloat in class DataBufferi - the element index.val - the new element value.
public void setElemFloat(int bank,
int i,
float val)
DataBufferi before updating the underlying
data array.
setElemFloat in class DataBufferbank - the data bank index.i - the element index.val - the new element value.public double getElemDouble(int i)
DataBufferdouble. The offset (specified in the constructor) is added
to i before accessing the underlying data array.
getElemDouble in class DataBufferi - the element index.
public double getElemDouble(int bank,
int i)
DataBufferdouble. The offset (specified in the constructor) is
added to i before accessing the underlying data array.
getElemDouble in class DataBufferbank - the bank index.i - the element index.
public void setElemDouble(int i,
double val)
DataBufferi before updating the underlying
data array.
setElemDouble in class DataBufferi - the element index.val - the new element value.
public void setElemDouble(int bank,
int i,
double val)
DataBufferi before updating the underlying
data array.
setElemDouble in class DataBufferbank - the data bank index.i - the element index.val - the new element value.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||