Int2D
Contents
[
Hide
]Inheritance: java.lang.Object
public final class Int2D
Created by lexchou on 5/17/2017. 2-dimensional int array wrapper
Constructors
Constructor | Description |
---|---|
Int2D(int rows, int columns) | Construct a 2D int array with default data allocation. |
Int2D(int rows, int columns, int[] data) | Construct a 2D int array with given data |
Methods
Method | Description |
---|---|
equals(Object arg0) | |
get(int r, int c) | Gets the element at specified position |
getClass() | |
getColumns() | |
getLength(int rank) | |
getRows() | |
hashCode() | |
length() | Gets the total length of this 2d array |
notify() | |
notifyAll() | |
set(int r, int c, int v) | Sets the element at specified position |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
Int2D(int rows, int columns)
public Int2D(int rows, int columns)
Construct a 2D int array with default data allocation.
Parameters:
Parameter | Type | Description |
---|---|---|
rows | int | Number of rows of the 2D array |
columns | int | Number of columns of the 2D array |
Int2D(int rows, int columns, int[] data)
public Int2D(int rows, int columns, int[] data)
Construct a 2D int array with given data
Parameters:
Parameter | Type | Description |
---|---|---|
rows | int | Number of rows of the 2D array |
columns | int | Number of columns of the 2D array |
data | int[] | Array to wrap, Float2D will use this array internally. |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
get(int r, int c)
public int get(int r, int c)
Gets the element at specified position
Parameters:
Parameter | Type | Description |
---|---|---|
r | int | Row |
c | int | Column |
Returns: int - the value at specified position
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getColumns()
public int getColumns()
Returns: int
getLength(int rank)
public int getLength(int rank)
Parameters:
Parameter | Type | Description |
---|---|---|
rank | int |
Returns: int
getRows()
public int getRows()
Returns: int
hashCode()
public native int hashCode()
Returns: int
length()
public int length()
Gets the total length of this 2d array
Returns: int - the total number of floats in this 2d array.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
set(int r, int c, int v)
public void set(int r, int c, int v)
Sets the element at specified position
Parameters:
Parameter | Type | Description |
---|---|---|
r | int | Row |
c | int | Column |
v | int | Value |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |