*/
public final class PAPBinTable
{
- protected ArrayList _paragraphs = new ArrayList();
+ protected ArrayList<PAPX> _paragraphs = new ArrayList<PAPX>();
byte[] _dataStream;
/** So we can know if things are unicode or not */
}
else
{
- PAPX currentPap = (PAPX)_paragraphs.get(listIndex);
+ PAPX currentPap = _paragraphs.get(listIndex);
if (currentPap != null && currentPap.getStart() < cpStart)
{
SprmBuffer clonedBuf = null;
int endMark = offset + length;
int endIndex = listIndex;
- PAPX papx = (PAPX)_paragraphs.get(endIndex);
+ PAPX papx = _paragraphs.get(endIndex);
while (papx.getEnd() < endMark)
{
- papx = (PAPX)_paragraphs.get(++endIndex);
+ papx = _paragraphs.get(++endIndex);
}
if (listIndex == endIndex)
{
- papx = (PAPX)_paragraphs.get(endIndex);
+ papx = _paragraphs.get(endIndex);
papx.setEnd((papx.getEnd() - endMark) + offset);
}
else
{
- papx = (PAPX)_paragraphs.get(listIndex);
+ papx = _paragraphs.get(listIndex);
papx.setEnd(offset);
for (int x = listIndex + 1; x < endIndex; x++)
{
- papx = (PAPX)_paragraphs.get(x);
+ papx = _paragraphs.get(x);
papx.setStart(offset);
papx.setEnd(offset);
}
- papx = (PAPX)_paragraphs.get(endIndex);
+ papx = _paragraphs.get(endIndex);
papx.setEnd((papx.getEnd() - endMark) + offset);
}
for (int x = endIndex + 1; x < size; x++)
{
- papx = (PAPX)_paragraphs.get(x);
+ papx = _paragraphs.get(x);
papx.setStart(papx.getStart() - length);
papx.setEnd(papx.getEnd() - length);
}
}
- public ArrayList getParagraphs()
+ public ArrayList<PAPX> getParagraphs()
{
return _paragraphs;
}
endingFc += fcMin;
- ArrayList overflow = _paragraphs;
+ ArrayList<PAPX> overflow = _paragraphs;
do
{
PropertyNode startingProp = (PropertyNode)overflow.get(0);
private static final int BX_SIZE = 13;
private static final int FC_SIZE = 4;
- private ArrayList _papxList = new ArrayList();
- private ArrayList _overFlow;
+ private ArrayList<PAPX> _papxList = new ArrayList<PAPX>();
+ private ArrayList<PAPX> _overFlow;
private byte[] _dataStream;
*
* @param filler a List of PAPXs
*/
- public void fill(List filler)
+ public void fill(List<PAPX> filler)
{
_papxList.addAll(filler);
}
*
* @return The remaining PAPXs that didn't fit into this FKP.
*/
- ArrayList getOverflow()
+ ArrayList<PAPX> getOverflow()
{
return _overFlow;
}
*/
public PAPX getPAPX(int index)
{
- return (PAPX)_papxList.get(index);
+ return _papxList.get(index);
}
/**
// see if we couldn't fit some
if (index != size)
{
- _overFlow = new ArrayList();
+ _overFlow = new ArrayList<PAPX>();
_overFlow.addAll(_papxList.subList(index, size));
}
lastGrpprl = new byte[0];
for (int x = 0; x < index; x++)
{
- papx = (PAPX)_papxList.get(x);
+ papx = _papxList.get(x);
byte[] phe = papx.getParagraphHeight().toByteArray();
byte[] grpprl = papx.getGrpprl();