protected int entityIndex(Entity entity){
  return Arrays.binarySearch(entities,entity);
}

protected int entityIndex ( Entity entity ) { return Arrays . binarySearch ( entities , entity ) ; }
check whether the device contains the specified entity
