public boolean isValid(int pixel){
  return ((pixel >= 0 && pixel < map_size) && (validBits == null || validBits.testBit(pixel)));
}

public boolean isValid ( int pixel ) { return ( ( pixel >= 0 && pixel < map_size ) && ( validBits == null || validBits . testBit ( pixel ) ) ) ; }
returns whether or not the pixel is valid .
