ShellingSegregationModel.java
/**
	 * @return number of the neighboring cells that are the same
	 */
@return number of the neighboring cells that are the same
@return number of the neighboring cells that are the same
int sameNeighbors(int x, int y)
    {
        return Element.NULL.equals(getField().get(x,y))
				? 0 
				: Collections.frequency(
						getField().getNeighbors(x,y),
						getField().get(x,y));
    }
int sameNeighbors ( int x , int y ) { return Element . NULL . equals ( getField ( ) . get ( x , y ) ) ? 0 : Collections . frequency ( getField ( ) . getNeighbors ( x , y ) , getField ( ) . get ( x , y ) ) ; }
@return number of the neighboring cells that are the same
@return number of the neighboring cells that are the same