code: private void setLevels(int start, int limit, byte newLevel) {
          for (int i = start; i < limit; ++i) {
              resultLevels[i] = newLevel;
          }
      }
docs: Set resultLevels from start up to (but not including) limit to newLevel.