Class EnumNumber
java.lang.Object
org.apache.fop.fo.properties.Property
org.apache.fop.fo.properties.EnumNumber
- All Implemented Interfaces:
Numeric
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PropertyCache<EnumNumber> cache holding all canonical EnumNumber instancesprivate final EnumProperty -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturn the dimension of this numeric.intgetEnum()This method expects to be overridden by subclassesstatic EnumNumbergetInstance(Property enumProperty) Returns the canonical EnumNumber instance corresponding to the given PropertyThis method expects to be overridden by subclassesdoubleReturn the value of this NumericdoublegetNumericValue(PercentBaseContext context) Return the value of this NumericThis method expects to be overridden by subclassesThis method expects to be overridden by subclasses.intgetValue()Returns the value of this numeric as an int.intgetValue(PercentBaseContext context) Returns the value of this numeric as an int.inthashCode()booleanReturn true if the numeric is an absolute value.Methods inherited from class Property
getCharacter, getColor, getCondLength, getKeep, getLength, getLengthPair, getLengthRange, getList, getNCname, getNumber, getSpace, getSpecifiedValue, isAuto, setSpecifiedValue, toString
-
Field Details
-
CACHE
cache holding all canonical EnumNumber instances -
enumProperty
-
-
Constructor Details
-
EnumNumber
Constructor- Parameters:
enumProperty- the base EnumProperty
-
-
Method Details
-
getInstance
Returns the canonical EnumNumber instance corresponding to the given Property- Parameters:
enumProperty- the base EnumProperty- Returns:
- the canonical instance
-
getEnum
-
getString
-
getObject
-
equals
-
hashCode
-
getDimension
public int getDimension()Return the dimension of this numeric. Plain numbers has a dimension of 0 and length has a dimension of 1. Other dimension can occur as a result of multiplications and divisions.- Specified by:
getDimensionin interfaceNumeric- Returns:
- the dimension.
-
isAbsolute
public boolean isAbsolute()Return true if the numeric is an absolute value. Relative values are percentages and table-column-units. All other numerics are absolute. Alwaystruefor instances of this type- Specified by:
isAbsolutein interfaceNumeric- Returns:
- true when the numeric is absolute.
-
getNumericValue
Return the value of this Numeric logs an error, because it's not supposed to be called- Specified by:
getNumericValuein interfaceNumeric- Parameters:
context- The context for the length calculation (for percentage based lengths)- Returns:
- the computed value.
-
getValue
Returns the value of this numeric as an int. logs an error, because it's not supposed to be called -
getValue
-
getNumericValue
public double getNumericValue()Return the value of this Numeric logs an error, because it's not supposed to be called- Specified by:
getNumericValuein interfaceNumeric- Returns:
- the computed value.
-
getNumeric
This method expects to be overridden by subclasses- Overrides:
getNumericin classProperty- Returns:
- Numeric property value
-