pbwest 2004/04/20 10:15:56
Modified: src/java/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
EnumType.java
Log:
Initial phase of corresponding property handling
Revision Changes Path
No revision
No revision
1.1.2.3 +18 -3 xml-fop/src/java/org/apache/fop/datatypes/Attic/EnumType.java
Index: EnumType.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Attic/EnumType.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- EnumType.java 19 Feb 2004 03:11:55 -0000 1.1.2.2
+++ EnumType.java 20 Apr 2004 17:15:56 -0000 1.1.2.3
@@ -164,6 +164,21 @@
}
/**
+ * Return the ENUM value from a PropertyValue.
+ * @param pv
+ * @return the ENUM constant
+ * @exception PropertyException if the <code>PropertyValue</code> is not
+ * an <code>EnumType</code>
+ */
+ public static int getEnumValue(PropertyValue pv)
+ throws PropertyException {
+ if (pv.getType() == PropertyValue.ENUM) {
+ return ((EnumType)pv).getEnumValue();
+ }
+ throw new PropertyException("PropertyValue not an ENUM type");
+ }
+
+ /**
* @return the <tt>String</tt> enumeration token.
*/
public String getEnumToken() throws PropertyException {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]