Class PieceListImpl
- java.lang.Object
-
- com.biglybt.core.disk.impl.piecemapper.impl.PieceListImpl
-
- All Implemented Interfaces:
DMPieceList
public class PieceListImpl extends java.lang.Object implements DMPieceList
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
cumulativeLengths
private PieceMapEntryImpl[]
pieces
-
Constructor Summary
Constructors Modifier Constructor Description protected
PieceListImpl(PieceMapEntryImpl[] _pieces)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PieceListImpl
convert(java.util.List pieceList)
DMPieceMapEntry
get(int index)
int
getCumulativeLengthToPiece(int index)
private void
initializeCumulativeLengths()
int
size()
-
-
-
Field Detail
-
pieces
private final PieceMapEntryImpl[] pieces
-
cumulativeLengths
private final int[] cumulativeLengths
-
-
Constructor Detail
-
PieceListImpl
protected PieceListImpl(PieceMapEntryImpl[] _pieces)
-
-
Method Detail
-
convert
public static PieceListImpl convert(java.util.List pieceList)
-
initializeCumulativeLengths
private void initializeCumulativeLengths()
-
size
public int size()
- Specified by:
size
in interfaceDMPieceList
-
get
public DMPieceMapEntry get(int index)
- Specified by:
get
in interfaceDMPieceList
-
getCumulativeLengthToPiece
public int getCumulativeLengthToPiece(int index)
- Specified by:
getCumulativeLengthToPiece
in interfaceDMPieceList
-
-