Cell2D

Inheritance: java.lang.Object

public class Cell2D

2D cell

Constructors

Constructor Description
Cell2D()

Fields

Field Description
BlackCount Count of black in the cell
SumX Sum of x coordinate to compute a center mass
SumY Sum of y coordinate to compute a center mass
WhiteCount Count of white in the cell

Methods

Method Description
accumulate(byte pixel, int x, int y) Adds the pixel to WhiteCount or BlackCount
equals(Object arg0)
getClass()
getX() X-coordinate of the center
getY() Y-coordinate of the center
hashCode()
notify()
notifyAll()
setX(int value) X-coordinate of the center
setY(int value) Y-coordinate of the center
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

Cell2D()

public Cell2D()

BlackCount

public int BlackCount

Count of black in the cell

SumX

public int SumX

Sum of x coordinate to compute a center mass

SumY

public int SumY

Sum of y coordinate to compute a center mass

WhiteCount

public int WhiteCount

Count of white in the cell

accumulate(byte pixel, int x, int y)

public void accumulate(byte pixel, int x, int y)

Adds the pixel to WhiteCount or BlackCount

Parameters:

Parameter Type Description
pixel byte Color of a pixel
x int X-coordinate of pixel
y int Y-coordinate of pixel

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getX()

public int getX()

X-coordinate of the center

Returns: int

getY()

public int getY()

Y-coordinate of the center

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setX(int value)

public void setX(int value)

X-coordinate of the center

Parameters:

Parameter Type Description
value int

setY(int value)

public void setY(int value)

Y-coordinate of the center

Parameters:

Parameter Type Description
value int

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native 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