code: private static <T> void batchCount(T[] array, int start, int end, CountProcedure<T> castProcedure)
      {
          for (int i = start; i < end; i++)
          {
              castProcedure.value(array[i]);
          }
      }
docs: Implemented to avoid megamorphic call on castProcedure.