|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.unh.sdb.common.Datum
edu.unh.sdb.common.FloatDatum
public class FloatDatum
Represent multiple data values for a single point. This implementation stores values as an array of floats, regardless of the orginal type of an attribute.
| Constructor Summary | |
|---|---|
FloatDatum(Datum d)
Copy Constructor creates a copy of the argument datum. |
|
FloatDatum(float value)
Deprecated. |
|
FloatDatum(float[] values)
Creates a datum with attributes containing the argument values. |
|
FloatDatum(float[] values,
int startIndex,
int count)
Creates a datum by copying a subset of values from an array. |
|
FloatDatum(FloatDatum d)
Copy Constructor creates a copy of the argument datum. |
|
FloatDatum(FloatDatum[] datums)
This constructor creates a single FloatDatum from an array of datums. |
|
FloatDatum(int numvalues)
Creates a null datum with the specified number of values. |
|
FloatDatum(int[] values)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
assign(float[] data)
Deprecated. Use setFloats( float[] ) |
void |
assign(float[] values,
int startIndex,
int numAttributes)
Deprecated. Use setFloats( float[], int, int ), but note that the semantics of the start index is different in setFloats; the second argument is the array index to start the copy. |
int |
byteSize()
Return the size in bytes needed to store the data for the attributes. |
java.lang.Object |
clone()
Return a copy of this datum. |
void |
copyTo(Datum d)
Copy the values of this FloatDatum object into the argument datum. |
void |
copyTo(FloatDatum d)
Copy the values of this FloatDatum object into the argument datum. |
boolean |
equals(java.lang.Object o)
Determine if the argument is a FloatDatum with the same set of data values. |
byte |
getByte(int i)
Return the field specified by the argument as a byte. |
double |
getDouble(int i)
Return the field specified by the argument as a double. |
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 double array |
int |
getInt(int i)
Return the field specified by the argument as a int. |
short |
getShort(int i)
Return the field specified by the argument as a short. |
int |
getStorageType()
Return the StorageType for this Datum |
Values |
getValues()
Return all attributes of the Datum as a Values object |
boolean |
isNull(int i)
Returns true if the field specified by the argument is null, false otherwise. |
void |
setByte(int i,
byte v)
Set the attribute indicated by the first argument to the value of the second argument. |
void |
setDouble(int i,
double v)
Set the attribute indicated by the first argument to the value of the second argument. |
void |
setFloat(int i,
float v)
Set the attribute indicated by the first argument to the value of the second argument. |
void |
setFloats(float[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array. |
void |
setInt(int i,
int v)
Set the attribute indicated by the first argument to the value of the second argument. |
void |
setNull(int i)
Set the field specified by the argument to null. |
void |
setShort(int i,
short v)
Set the attribute indicated by the first argument to the value of the second argument. |
int |
size()
Return the number of attributes in the datum. |
void |
subset(Datum d,
RecordSpec spec)
Copy the attributes specified by the RecordSpec into the argument datum. |
void |
subset(FloatDatum d,
RecordSpec spec)
Copy the attributes specified by the RecordSpec into the argument datum. |
Datum |
subset(RecordSpec spec)
Return a new datum with the attributes indicated by the RecordSpec. |
java.lang.String |
toString()
Return a string representation of the datum. |
| Methods inherited from class edu.unh.sdb.common.Datum |
|---|
create, create, create, create, create, create, create, create, create, create, create, create, getBytes, getBytes, getBytes, getDoubles, getDoubles, getFloats, getInts, getInts, getNumAttributes, getShorts, getShorts, setBytes, setBytes, setBytes, setDoubles, setDoubles, setDoubles, setFloats, setFloats, setInts, setInts, setInts, setShorts, setShorts, setShorts |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FloatDatum(int numvalues)
public FloatDatum(float value)
public FloatDatum(float[] values)
public FloatDatum(float[] values,
int startIndex,
int count)
public FloatDatum(int[] values)
public FloatDatum(FloatDatum d)
public FloatDatum(Datum d)
public FloatDatum(FloatDatum[] datums)
| Method Detail |
|---|
public java.lang.Object clone()
clone in class Datumpublic void copyTo(FloatDatum d)
public void copyTo(Datum d)
copyTo in class Datumpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void setNull(int i)
public void setDouble(int i,
double v)
setDouble in class Datum
public void setFloat(int i,
float v)
setFloat in class Datum
public void setInt(int i,
int v)
setInt in class Datum
public void setShort(int i,
short v)
setShort in class Datum
public void setByte(int i,
byte v)
setByte in class Datum
public void setFloats(float[] values,
int startIndex,
int numAttributes)
setFloats in class Datumpublic void assign(float[] data)
public void assign(float[] values,
int startIndex,
int numAttributes)
public float[] getFloats()
getFloats in class Datumpublic double getDouble(int i)
getDouble in class Datumpublic float getFloat(int i)
getFloat in class Datumpublic int getInt(int i)
getInt in class Datumpublic short getShort(int i)
getShort in class Datumpublic byte getByte(int i)
getByte in class Datumpublic Values getValues()
getValues in class Datumpublic boolean isNull(int i)
public Datum subset(RecordSpec spec)
subset in class Datum
public void subset(FloatDatum d,
RecordSpec spec)
public void subset(Datum d,
RecordSpec spec)
subset in class Datumpublic java.lang.String toString()
toString in class java.lang.Objectpublic int size()
size in class Datumpublic int byteSize()
byteSize in class Datumpublic int getStorageType()
getStorageType in class Datum
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||