public abstract class Datum
extends java.lang.Object
Constructor and Description |
---|
Datum()
Default constructor does nothing.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
byteSize()
Return the size in bytes required to store the attributes in the datum.
|
abstract java.lang.Object |
clone()
Return a copy of this datum.
|
abstract void |
copyTo(Datum d)
Copy the values of this Datum object into the argument datum.
|
static Datum |
create(byte value)
Create a single attribute Datum composed of 1 byte.
|
static Datum |
create(byte[] vals)
Create a multi attribute Datum composed of byte attributes.
|
static Datum |
create(double value)
Create a single attribute Datum composed of 1 double.
|
static Datum |
create(double[] vals)
Create a multi attribute Datum composed of double attributes.
|
static Datum |
create(float value)
Create a single attribute Datum composed of 1 float.
|
static Datum |
create(float[] vals)
Create a multi attribute Datum composed of double attributes.
|
static Datum |
create(int value)
Create a single attribute Datum composed of 1 int.
|
static Datum |
create(int[] vals)
Create a multi attribute Datum composed of int attributes.
|
static Datum |
create(RecordDescriptor rd)
Create a multi attribute Datum composed of mixed type attributes.
|
static Datum |
create(RecordDescriptor rd,
RecordSpec rs)
Create a multi attribute Datum composed of mixed type attributes.
|
static Datum |
create(short value)
Create a single attribute Datum composed of 1 short.
|
static Datum |
create(short[] vals)
Create a multi attribute Datum composed of short attributes.
|
abstract byte |
getByte(int i)
Return the field specified by the argument as a byte.
|
byte[] |
getBytes()
Return all attributes of the Datum as a 1-d byte array
|
byte[] |
getBytes(byte[] fill)
Return all attributes of the Datum in the passed array.
|
void |
getBytes(byte[] destination,
int index)
Returns all the attributes of the Datum in the passed array,
storing them starting at 'index'.
|
abstract double |
getDouble(int i)
Return the field specified by the argument as a double.
|
double[] |
getDoubles()
Return all attributes of the Datum as a 1-d double array
|
double[] |
getDoubles(double[] fill)
Return all attributes of the Datum in the passed array.
|
abstract float |
getFloat(int i)
Return the field specified by the argument as a float.
|
float[] |
getFloats()
Return all attributes of the Datum as a 1-d float array
|
float[] |
getFloats(float[] fill)
Return all attributes of the Datum in the passed array.
|
abstract int |
getInt(int i)
Return the field specified by the argument as a int.
|
int[] |
getInts()
Return all attributes of the Datum as a 1-d int array
|
int[] |
getInts(int[] fill)
Return all attributes of the Datum in the passed array.
|
int |
getNumAttributes()
Return the number of attributes in the datum.
|
abstract short |
getShort(int i)
Return the field specified by the argument as a short.
|
short[] |
getShorts()
Return all attributes of the Datum as a 1-d short array
|
short[] |
getShorts(short[] fill)
Return all attributes of the Datum in the passed array.
|
abstract int |
getStorageType()
Return the StorageType for this Datum.
|
abstract Values |
getValues()
Return all attributes of the Datum in a Values object
|
abstract void |
setByte(int i,
byte v)
Set the attribute indicated by the first argument to the value
of the second argument.
|
void |
setBytes(byte[] data)
Copy the values in the argument array to this datum.
|
void |
setBytes(byte[] data,
int start)
Copy the values in the argument array to this datum.
|
void |
setBytes(byte[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array.
|
abstract void |
setDouble(int i,
double v)
Set the attribute indicated by the first argument to the value
of the second argument.
|
void |
setDoubles(double[] data)
Copy the values in the argument array to this datum.
|
void |
setDoubles(double[] data,
int start)
Copy values from a piece of the argument array to this datum.
|
void |
setDoubles(double[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array.
|
abstract void |
setFloat(int i,
float v)
Set the attribute indicated by the first argument to the value
of the second argument.
|
void |
setFloats(float[] data)
Copy the values in the argument array to this datum.
|
void |
setFloats(float[] data,
int start)
Copy the values in the argument array to this datum.
|
void |
setFloats(float[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array.
|
abstract void |
setInt(int i,
int v)
Set the attribute indicated by the first argument to the value
of the second argument.
|
void |
setInts(int[] data)
Copy the values in the argument array to this datum.
|
void |
setInts(int[] data,
int start)
Copy the values in the argument array to this datum.
|
void |
setInts(int[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array.
|
abstract void |
setShort(int i,
short v)
Set the attribute indicated by the first argument to the value
of the second argument.
|
void |
setShorts(short[] data)
Copy the values in the argument array to this datum.
|
void |
setShorts(short[] data,
int start)
Copy the values in the argument array to this datum.
|
void |
setShorts(short[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array.
|
abstract int |
size()
Return the number of attributes in the datum.
|
abstract void |
subset(Datum d,
RecordSpec spec)
Copy the attributes specified by the RecordSpec into the argument datum.
|
abstract Datum |
subset(RecordSpec spec)
Return a new datum with the attributes indicated by the RecordSpec.
|
public static Datum create(double value)
public static Datum create(double[] vals)
public static Datum create(float value)
public static Datum create(float[] vals)
public static Datum create(int value)
public static Datum create(int[] vals)
public static Datum create(short value)
public static Datum create(short[] vals)
public static Datum create(byte value)
public static Datum create(byte[] vals)
public static Datum create(RecordDescriptor rd)
public static Datum create(RecordDescriptor rd, RecordSpec rs)
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public abstract void copyTo(Datum d)
public abstract void setDouble(int i, double v)
public abstract void setFloat(int i, float v)
public abstract void setInt(int i, int v)
public abstract void setShort(int i, short v)
public abstract void setByte(int i, byte v)
public abstract double getDouble(int i)
public abstract float getFloat(int i)
public abstract int getInt(int i)
public abstract short getShort(int i)
public abstract byte getByte(int i)
public double[] getDoubles()
public double[] getDoubles(double[] fill)
public float[] getFloats()
public float[] getFloats(float[] fill)
public int[] getInts()
public int[] getInts(int[] fill)
public short[] getShorts()
public short[] getShorts(short[] fill)
public byte[] getBytes()
public byte[] getBytes(byte[] fill)
public void getBytes(byte[] destination, int index)
public abstract Values getValues()
public void setDoubles(double[] data)
public void setDoubles(double[] data, int start)
public void setDoubles(double[] values, int startIndex, int numAttributes)
public void setFloats(float[] data)
public void setFloats(float[] data, int start)
public void setFloats(float[] values, int startIndex, int numAttributes)
public void setInts(int[] data)
public void setInts(int[] data, int start)
public void setInts(int[] values, int startIndex, int numAttributes)
public void setShorts(short[] data)
public void setShorts(short[] data, int start)
public void setShorts(short[] values, int startIndex, int numAttributes)
public void setBytes(byte[] data)
public void setBytes(byte[] data, int start)
public void setBytes(byte[] values, int startIndex, int numAttributes)
public abstract Datum subset(RecordSpec spec)
public abstract void subset(Datum d, RecordSpec spec)
public abstract int getStorageType()
public abstract int size()
public abstract int byteSize()
public final int getNumAttributes()