|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttl.lin.data.array.IntArrayWritable
public class IntArrayWritable
| Constructor Summary | |
|---|---|
IntArrayWritable()
|
|
IntArrayWritable(int size)
Constructor that creates an empty array of a particular size. |
|
IntArrayWritable(int[] array)
Constructor with array as input. |
|
IntArrayWritable(int[] array,
int length)
Constructor with array as input and with a specific size. |
|
| Method Summary | |
|---|---|
int |
get(int i)
Returns the value at index i. |
int[] |
getArray()
Returns a reference to the underlying array. |
int[] |
getClone()
Returns a deep copy of the array. |
void |
readFields(DataInput in)
|
void |
set(int i,
int v)
Sets the value at index i. |
void |
setArray(int[] array)
Sets the underlying array. |
void |
setArray(int[] array,
int length)
Sets the underlying array and a specified length. |
int |
size()
Returns the size of the float array. |
String |
toString()
|
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntArrayWritable()
public IntArrayWritable(int[] array)
array - input array
public IntArrayWritable(int[] array,
int length)
array - input arraylength - lengthpublic IntArrayWritable(int size)
size - array size| Method Detail |
|---|
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOException
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic int[] getClone()
size(). That is, trailing unused space in the underlying array will be trimmed.
public int[] getArray()
size().
public void setArray(int[] array)
public void setArray(int[] array,
int length)
public int get(int i)
i - index position
public void set(int i,
int v)
i - position in arrayv - valuepublic 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 | |||||||||