From 19c1ab18a9d22898f0893a0e1890b7e69f965ae1 Mon Sep 17 00:00:00 2001
From: Jeremias Maerki HashMap
.
- The switch-over point from array to HashMap
was
+ integer is maintained in an array or a HashMap
.
+ The switch-over point from array to HashMap
was
determined by some highly implementation-dependent testing to
be in the region of four to five elements.
org.apache.fop.fo.properties.Direction
dataTypes
dataTypes
field contains the ENUM
data type constant, defined in Property
public static final int
- values, LTR
- and RTL
Property
. The enumeration integer constants
+ are defined as public static final int
+ values, LTR
+ and RTL
String[]
- rwEnums
String[]
+ rwEnums
rwEnums
and the enumeration constants be
+ >rwEnums and the enumeration constants be
maintained.`
The publicly accessible mapping from enumeration token to
enumeration constant is achieved through the method int
- getEnumIndex(String)
int
+ getEnumIndex(String)
. The corresponding
mapping from enumeration constant to enumeration token is
achieved through the method String
- getEnumText(int)
String
+ getEnumText(int)
.
org.apache.fop.fo.properties.RenderingIntent
dataTypes
dataTypes
ENUM
data type
- constant, defined in Property
ENUM
data type
+ constant, defined in Property
.
Enumeration integer constants are defined as public static
- final int
public static
+ final int
values. Zero is never used to
represent a valid enumeration constant. The enumeration
tokens are stored in the array String[] rwEnums
String[] rwEnums
HashMap
rwEnumHash
HashMap rwEnumHash
static {}
initializer. It is, of course,
- critical that synchronization between rwEnums
+ static {}
initializer. It is, of course,
+ critical that synchronization between rwEnums
and the enumeration constants be maintained.`
The publicly accessible mapping from enumeration token to
enumeration constant is achieved through the method int
- getEnumIndex(String)
int
+ getEnumIndex(String)
. The corresponding
mapping from enumeration constant to enumeration token is
achieved through the method String
- getEnumText(int)
String
+ getEnumText(int)
.
BorderCommonStyle
public static
- final int
public static
+ final int
enumeration integer constants.
Similarly, the enumeration tokens are stored in the array
String[] rwEnums
HashMap
- rwEnumHash
static
- {}
initializer. The mapping methods int
- getEnumIndex(String)
String
- getEnumText(int)
HashMap
+ rwEnumHash
static
+ {}
initializer. The mapping methods int
+ getEnumIndex(String)
String
+ getEnumText(int)
@@ -138,11 +138,11 @@
"simple-properties.html" >simple properties. These
values are defined in the individual sub-classes of this
class, e.g. BorderLeftStyle
BorderLeftStyle
is left
+ >BorderLeftStyle. None of the above fields
+ or methods occur, and BorderLeftStyle
is left
looking like an example of a simple property. The
enumeration mapping methods are, however, available through
- the super-class BorderCommonStyle
.
+ the super-class BorderCommonStyle
.
Numeric
result. Their
+ however, generate a Numeric
result. Their
resolution involves mapping the token to the indicated
- Numeric
value.
+ Numeric
value.
An example is the BorderCommonWidth
BorderCommonWidth
property. This,
like the example of BorderCommonStyle
above, also represents
+ >BorderCommonStyle above, also represents
common enumerated values which have been factored out to
form a super-class for particular properties. BorderCommonWidth
, therefore, also defines enumeration
- constant values
HashMap
, because of the
+ >BorderCommonWidth, therefore, also defines enumeration
+ constant values
HashMap
, because of the
limited number of tokens, but the mapping methods int
- getEnumIndex(String)
String
- getEnumText(int)
int
+ getEnumIndex(String)
and String
+ getEnumText(int)
The added element in this property is the array double[]
- mappedPoints
double[]
+ mappedPoints
. The entries in this array
must by maintained in syncronization with the String[]
- rwEnums
String[]
+ rwEnums
Numeric
- getMappedLength(FONode, int, int)
Numeric
+ getMappedLength(FONode, int, int)
method.
BorderLeftWidth
BorderCommonWidth
BorderLeftWidthBorderCommonWidth
PropertyValue
- getInitialValue(int)
PropertyValue
+ getInitialValue(int)
method to derive the
initial value.
Numeric getMappedNumeric(FONode, int, int)
pconsts
pconsts
. All properties which
+ support a mapped numeric value must have a Numeric
+ getMappedNumeric(FONode, int)
method, which will
be called through its singleton instance by the PropertyConsts
method.
+ >PropertyConsts method.