package org.apache.fop.fo.pagination;
import java.util.Collection;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.PropNames;
import org.apache.fop.fo.FObjectNames;
import org.apache.fop.fo.FOTree;
import org.apache.fop.fo.FONode;
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- private static final HashMap sparsePropsMap;
+ private static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
// applicableProps is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap(0);
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(sparsePropsMap, -1);
numProps = 0;
sparseIndices = new int[] {};
}
package org.apache.fop.fo.pagination;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.BitSet;
import java.util.NoSuchElementException;
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- private static final HashMap sparsePropsMap;
+ private static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
// applicableProps is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap(1);
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(sparsePropsMap, -1);
numProps = 1;
sparseIndices = new int[] { PropNames.MASTER_NAME };
- sparsePropsMap.put
- (Ints.consts.get(PropNames.MASTER_NAME), Ints.consts.get(0));
+ sparsePropsMap[PropNames.MASTER_NAME] = 0;
}
/** Constant values for FoSinglePageMasterReference.
See {@link #sparsePropsMap sparsePropsMap}. */
- private static final HashMap s_p_m_r_PropsMap;
+ private static final int[] s_p_m_r_PropsMap;
/** See {@link #sparseIndices sparseIndices}. */
private static final int[] s_p_m_r_Indices;
// applicableProps is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- s_p_m_r_PropsMap = new HashMap(1);
+ s_p_m_r_PropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(s_p_m_r_PropsMap, -1);
s_p_m_r_numProps = 1;
s_p_m_r_Indices = new int[] { PropNames.MASTER_REFERENCE };
- s_p_m_r_PropsMap.put
- (Ints.consts.get(PropNames.MASTER_REFERENCE),
- Ints.consts.get(0));
+ s_p_m_r_PropsMap[PropNames.MASTER_REFERENCE] = 0;
}
/** See {@link #sparsePropsMap sparsePropsMap}. */
- private static final HashMap r_p_m_r_PropsMap;
+ private static final int[] r_p_m_r_PropsMap;
/** See {@link #sparseIndices sparseIndices}. */
private static final int[] r_p_m_r_Indices;
// sparsePropsSet is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- r_p_m_r_PropsMap = new HashMap();
+ r_p_m_r_PropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(r_p_m_r_PropsMap, -1);
r_p_m_r_numProps = propsets.cardinality();
r_p_m_r_Indices = new int[r_p_m_r_numProps];
int propx = 0;
next >= 0;
next = propsets.nextSetBit(next + 1)) {
r_p_m_r_Indices[propx] = next;
- r_p_m_r_PropsMap.put
- (Ints.consts.get(next), Ints.consts.get(propx++));
+ r_p_m_r_PropsMap[next] = propx++;
}
}
/** See {@link #sparsePropsMap sparsePropsMap}. */
- private static final HashMap r_p_m_a_PropsMap;
+ private static final int[] r_p_m_a_PropsMap;
/** See {@link #sparseIndices sparseIndices}. */
private static final int[] r_p_m_a_Indices;
private static final int r_p_m_a_numProps;
static {
- r_p_m_a_PropsMap = new HashMap(1);
+ r_p_m_a_PropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(r_p_m_a_PropsMap, -1);
r_p_m_a_numProps = 1;
r_p_m_a_Indices = new int[] { PropNames.MAXIMUM_REPEATS };
- r_p_m_a_PropsMap.put
- (Ints.consts.get(PropNames.MAXIMUM_REPEATS),
- Ints.consts.get(0));
+ r_p_m_a_PropsMap[PropNames.MAXIMUM_REPEATS] = 0;
}
/** See {@link #sparsePropsMap sparsePropsMap}. */
- private static final HashMap c_p_m_r_PropsMap;
+ private static final int[] c_p_m_r_PropsMap;
/** See {@link #sparseIndices sparseIndices}. */
private static final int[] c_p_m_r_Indices;
// sparsePropsSet is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- c_p_m_r_PropsMap = new HashMap();
+ c_p_m_r_PropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(c_p_m_r_PropsMap, -1);
c_p_m_r_numProps = propsets.cardinality();
c_p_m_r_Indices = new int[c_p_m_r_numProps];
int propx = 0;
next >= 0;
next = propsets.nextSetBit(next + 1)) {
c_p_m_r_Indices[propx] = next;
- c_p_m_r_PropsMap.put
- (Ints.consts.get(next), Ints.consts.get(propx++));
+ c_p_m_r_PropsMap[next] = propx++;
}
}
import org.apache.fop.datastructs.TreeException;
import org.apache.fop.datatypes.Ints;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.BitSet;
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- protected static final HashMap sparsePropsMap;
+ protected static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
// sparsePropsSet is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap();
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(sparsePropsMap, -1);
numProps = propsets.cardinality();
sparseIndices = new int[numProps];
int propx = 0;
next >= 0;
next = propsets.nextSetBit(next + 1)) {
sparseIndices[propx] = next;
- sparsePropsMap.put
- (Ints.consts.get(next), Ints.consts.get(propx++));
+ sparsePropsMap[next] = propx++;
}
}
import org.apache.fop.datatypes.PropertyValue;
import org.apache.fop.datatypes.Ints;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.BitSet;
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- private static final HashMap sparsePropsMap;
+ private static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
// sparsePropsSet is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap();
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(sparsePropsMap, -1);
numProps = propsets.cardinality();
sparseIndices = new int[numProps];
int propx = 0;
next >= 0;
next = propsets.nextSetBit(next + 1)) {
sparseIndices[propx] = next;
- sparsePropsMap.put
- (Ints.consts.get(next), Ints.consts.get(propx++));
+ sparsePropsMap[next] = propx++;
}
}
import org.apache.fop.datastructs.TreeException;
import org.apache.fop.datatypes.Ints;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.BitSet;
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- protected static final HashMap sparsePropsMap;
+ protected static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
// sparsePropsSet is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap();
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(sparsePropsMap, -1);
numProps = propsets.cardinality();
sparseIndices = new int[numProps];
for (int next = propsets.nextSetBit(0);
next >= 0;
next = propsets.nextSetBit(next + 1)) {
sparseIndices[propx] = next;
- sparsePropsMap.put
- (Ints.consts.get(next), Ints.consts.get(propx++));
+ sparsePropsMap[next] = propx++;
}
}
import org.apache.fop.datatypes.NCName;
import org.apache.fop.datatypes.Ints;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.BitSet;
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- private static final HashMap sparsePropsMap;
+ private static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
// sparsePropsSet is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap();
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(sparsePropsMap, -1);
numProps = propsets.cardinality();
sparseIndices = new int[numProps];
int propx = 0;
next >= 0;
next = propsets.nextSetBit(next + 1)) {
sparseIndices[propx] = next;
- sparsePropsMap.put
- (Ints.consts.get(next), Ints.consts.get(propx++));
+ sparsePropsMap[next] = propx++;
}
}