fop 0.94

org.apache.fop.fo.properties
Class EnumNumber

java.lang.Object
  extended by org.apache.fop.fo.properties.Property
      extended by org.apache.fop.fo.properties.NumberProperty
          extended by org.apache.fop.fo.properties.EnumNumber
All Implemented Interfaces:
Numeric

public class EnumNumber
extends NumberProperty

A number quantity in XSL which is specified as an enum, such as "no-limit".


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.fop.fo.properties.NumberProperty
NumberProperty.Maker
 
Field Summary
 
Fields inherited from class org.apache.fop.fo.properties.Property
log
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int getEnum()
          This method expects to be overridden by subclasses
static EnumNumber getInstance(Property enumProperty)
          Returns the canonical EnumNumber instance corresponding to the given Property
 double getNumericValue()
          Returns the value as numeric.
 java.lang.Object getObject()
          This method expects to be overridden by subclasses
 java.lang.String getString()
          This method expects to be overridden by subclasses.
 int getValue()
          Returns the length in 1/1000ths of a point (millipoints)
 int hashCode()
          
 
Methods inherited from class org.apache.fop.fo.properties.NumberProperty
getColor, getDimension, getInstance, getInstance, getInstance, getLength, getNumber, getNumeric, getNumericValue, getValue, isAbsolute
 
Methods inherited from class org.apache.fop.fo.properties.Property
getCharacter, getCondLength, getKeep, getLengthPair, getLengthRange, getList, getNCname, getSpace, getSpecifiedValue, isAuto, setSpecifiedValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static EnumNumber getInstance(Property enumProperty)
Returns the canonical EnumNumber instance corresponding to the given Property

Parameters:
enumProperty - the base EnumProperty
Returns:
the canonical instance

getEnum

public int getEnum()
Description copied from class: Property
This method expects to be overridden by subclasses

Specified by:
getEnum in interface Numeric
Overrides:
getEnum in class Property
Returns:
integer equivalent of enumerated property value

getValue

public int getValue()
Returns the length in 1/1000ths of a point (millipoints)

Specified by:
getValue in interface Numeric
Overrides:
getValue in class NumberProperty
Returns:
the length in millipoints
See Also:
Numeric.getValue()

getNumericValue

public double getNumericValue()
Returns the value as numeric.

Specified by:
getNumericValue in interface Numeric
Overrides:
getNumericValue in class NumberProperty
Returns:
the length in millipoints
See Also:
Numeric.getNumericValue()

getString

public java.lang.String getString()
Description copied from class: Property
This method expects to be overridden by subclasses.

Overrides:
getString in class Property
Returns:
String property value
See Also:
Property.getString()

getObject

public java.lang.Object getObject()
Description copied from class: Property
This method expects to be overridden by subclasses

Overrides:
getObject in class NumberProperty
Returns:
this.number cast as an Object
See Also:
Property.getString()

equals

public boolean equals(java.lang.Object obj)
Description copied from class: NumberProperty

Overrides:
equals in class NumberProperty
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from class: NumberProperty

Overrides:
hashCode in class NumberProperty
See Also:
Object.hashCode()

fop 0.94

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.