|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.io.array.ArrayOfDoublesWritable
public class ArrayOfDoublesWritable
An array of doubles that implements Writable class.
| Constructor Summary | |
|---|---|
ArrayOfDoublesWritable()
Constructor with no arguments. |
|
ArrayOfDoublesWritable(double[] array)
Constructor take in a one-dimensional array. |
|
ArrayOfDoublesWritable(int size)
Constructor that takes the size of the array as an argument. |
|
| Method Summary | |
|---|---|
double |
get(int i)
Returns the double value at position i. |
double[] |
getArray()
Get a shallow copy of the array. |
double[] |
getClone()
Get a deep copy of the array. |
void |
readFields(DataInput in)
|
void |
set(int i,
double f)
Sets the double at position i to f. |
void |
setArray(double[] array)
Set the array. |
int |
size()
Returns the size of the double array. |
String |
toString()
|
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayOfDoublesWritable()
public ArrayOfDoublesWritable(double[] array)
array - input double arraypublic ArrayOfDoublesWritable(int size)
size - number of doubles in array| Method Detail |
|---|
public void readFields(DataInput in)
throws IOException
readFields in interface WritableIOException
public void write(DataOutput out)
throws IOException
write in interface WritableIOExceptionpublic double[] getClone()
public double[] getArray()
public void setArray(double[] array)
array - public double get(int i)
i - index of double to be returned
public void set(int i,
double f)
i - position in arrayf - double value to be setpublic int size()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||