public class ShortDatum extends Datum
Constructor and Description |
---|
ShortDatum(Datum d)
Copy Constructor creates a copy of the argument datum.
|
ShortDatum(int numvalues)
Creates a null datum with the specified number of values.
|
ShortDatum(int[] values)
Creates a datum with attributes containing the argument values.
|
ShortDatum(short value)
Deprecated.
|
ShortDatum(short[] values)
Creates a datum with attributes containing the argument values.
|
ShortDatum(short[] values,
int startIndex,
int numAttributes)
Deprecated.
Not really deprecated. Just looking for usage.
specifies the datum index of the datum to be copied, where all datums in
the array are assumed to be of the same length.
|
ShortDatum(ShortDatum d)
Copy Constructor creates a copy of the argument datum.
|
ShortDatum(ShortDatum[] datums)
This constructor creates a single ShortDatum from an array of datums.
|
Modifier and Type | Method and Description |
---|---|
void |
assign(short[] data)
Deprecated.
Use setShorts( short[] )/
|
void |
assign(short[] values,
int startIndex,
int numAttributes)
Deprecated.
Use setShorts( short[], int start, int numAttr );
Note that the semantics of the start argument of setShorts is different.
|
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 ShortDatum object into the argument datum.
|
void |
copyTo(ShortDatum d)
Copy the values of this ShortDatum object into the argument datum.
|
boolean |
equals(java.lang.Object o)
Determine if the argument is a ShortDatum 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.
|
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.
|
short[] |
getShorts()
Return all attributes of the Datum as a 1-d short array
|
int |
getStorageType()
Return the StorageType for this Datum
|
Values |
getValues()
Return all attributes in 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 |
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.
|
void |
setShorts(short[] values,
int startIndex,
int numAttributes)
Assigns values to an existing datum by copying a subset of values from an array.
|
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.
|
Datum |
subset(RecordSpec spec)
Return a new datum with the attributes indicated by the RecordSpec.
|
void |
subset(ShortDatum d,
RecordSpec spec)
Copy the attributes specified by the RecordSpec into the argument datum.
|
java.lang.String |
toString()
Return a string representation of the datum.
|
create, create, create, create, create, create, create, create, create, create, create, create, getBytes, getBytes, getBytes, getDoubles, getDoubles, getFloats, getFloats, getInts, getInts, getNumAttributes, getShorts, setBytes, setBytes, setBytes, setDoubles, setDoubles, setDoubles, setFloats, setFloats, setFloats, setInts, setInts, setInts, setShorts, setShorts
public ShortDatum(int numvalues)
public ShortDatum(short value)
public ShortDatum(short[] values)
public ShortDatum(short[] values, int startIndex, int numAttributes)
public ShortDatum(int[] values)
public ShortDatum(ShortDatum d)
public ShortDatum(Datum d)
public ShortDatum(ShortDatum[] datums)
public java.lang.Object clone()
public void copyTo(ShortDatum d)
public void copyTo(Datum d)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void setDouble(int i, double v)
public void setFloat(int i, float v)
public void setInt(int i, int v)
public void setShort(int i, short v)
public void setByte(int i, byte v)
public void setShorts(short[] values, int startIndex, int numAttributes)
public void assign(short[] data)
public void assign(short[] values, int startIndex, int numAttributes)
public double getDouble(int i)
public float getFloat(int i)
public int getInt(int i)
public short getShort(int i)
public byte getByte(int i)
public short[] getShorts()
public Values getValues()
public Datum subset(RecordSpec spec)
public void subset(ShortDatum d, RecordSpec spec)
public void subset(Datum d, RecordSpec spec)
public java.lang.String toString()
toString
in class java.lang.Object
public int size()
public int byteSize()
public int getStorageType()
getStorageType
in class Datum