pieces = _pieces; cumulativeLengths = new int[pieces.length]; initializeCumulativeLengths();
return new PieceListImpl((PieceMapEntryImpl[])pieceList.toArray(new PieceMapEntryImpl[pieceList.size()]));
return pieces[index];
return cumulativeLengths[index];
int runningLength = 0; for (int i = 0; i < pieces.length; i++) { runningLength += pieces[i].getLength(); cumulativeLengths[i] = runningLength; }
return pieces.length;