|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.example.ByteArrayDataRow
public class ByteArrayDataRow
Implementation of DataRow that is backed by a byte array. Please note that using this data row is quite efficient but only supports 256 different values (integers between 0 and 256 or 256 different nominal values for each column).
| Field Summary | |
|---|---|
private byte[] |
data
Holds the data for all attributes. |
| Constructor Summary | |
|---|---|
ByteArrayDataRow(byte[] data)
Creates a new data row backed by an primitive array. |
|
| Method Summary | |
|---|---|
void |
ensureNumberOfColumns(int numberOfColumns)
Creates a new array of the given size if necessary and copies the data into the new array. |
double |
get(Attribute attribute)
Returns the desired data for the given attribute. |
void |
set(Attribute attribute,
double value)
Sets the given data for the given attribute. |
java.lang.String |
toString()
Returns a string representation of the data row. |
void |
trim()
Does nothing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private byte[] data
| Constructor Detail |
|---|
public ByteArrayDataRow(byte[] data)
| Method Detail |
|---|
public double get(Attribute attribute)
get in interface DataRow
public void set(Attribute attribute,
double value)
set in interface DataRowpublic void ensureNumberOfColumns(int numberOfColumns)
ensureNumberOfColumns in interface DataRowpublic void trim()
trim in interface DataRowpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||