|
|||||||||
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.ByteDatum
public class ByteDatum
Represent multiple data values for a single point. This implementation stores values as an array of individual bytes, regardless of the orginal type of an attribute.
Constructor Summary | |
---|---|
ByteDatum(byte value)
Deprecated. |
|
ByteDatum(byte[] values)
Creates a datum with attributes containing the argument values. |
|
ByteDatum(byte[] values,
int startIndex,
int numAttributes)
Deprecated. Not really; just looking for usage because of changed semantics (01/05) |
|
ByteDatum(ByteDatum d)
Copy Constructor creates a copy of the argument datum. |
|
ByteDatum(ByteDatum[] datums)
This constructor creates a single ByteDatum from an array of datums. |
|
ByteDatum(Datum d)
Copy Constructor creates a copy of the argument datum. |
|
ByteDatum(int numvalues)
Creates a null datum with the specified number of values. |
|
ByteDatum(int[] values)
Creates a datum with attributes containing the argument values. |
Method Summary | |
---|---|
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(ByteDatum d)
Copy the values of this ByteDatum object into the argument datum. |
void |
copyTo(Datum d)
Copy the values of this ByteDatum object into the argument datum. |
boolean |
equals(java.lang.Object o)
Determine if the argument is a ByteDatum with the same set of data values. |
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 |
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. |
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 |
void |
setByte(int i,
byte v)
Set the attribute indicated by the first argument to the value of the second argument. |
void |
setBytes(byte[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array. |
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 |
setInt(int i,
int v)
Set the attribute indicated by the first argument to the value of the second argument. |
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(ByteDatum d,
RecordSpec spec)
Copy the attributes specified by the RecordSpec into the argument datum. |
void |
subset(Datum 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, getDoubles, getDoubles, getFloats, getFloats, getInts, getInts, getNumAttributes, getShorts, getShorts, setBytes, setBytes, setDoubles, setDoubles, setDoubles, setFloats, 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 ByteDatum(int numvalues)
public ByteDatum(byte value)
public ByteDatum(byte[] values)
public ByteDatum(byte[] values, int startIndex, int numAttributes)
public ByteDatum(int[] values)
public ByteDatum(ByteDatum d)
public ByteDatum(Datum d)
public ByteDatum(ByteDatum[] datums)
Method Detail |
---|
public java.lang.Object clone()
clone
in class Datum
public void copyTo(ByteDatum d)
public void copyTo(Datum d)
copyTo
in class Datum
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
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 setBytes(byte[] values, int startIndex, int numAttributes)
setBytes
in class Datum
public double getDouble(int i)
getDouble
in class Datum
public float getFloat(int i)
getFloat
in class Datum
public int getInt(int i)
getInt
in class Datum
public short getShort(int i)
getShort
in class Datum
public byte getByte(int i)
getByte
in class Datum
public byte[] getBytes()
getBytes
in class Datum
public Values getValues()
getValues
in class Datum
public Datum subset(RecordSpec spec)
subset
in class Datum
public void subset(ByteDatum d, RecordSpec spec)
public void subset(Datum d, RecordSpec spec)
subset
in class Datum
public java.lang.String toString()
toString
in class java.lang.Object
public int size()
size
in class Datum
public int byteSize()
byteSize
in class Datum
public int getStorageType()
getStorageType
in class Datum
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |