[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-cvs
Subject:    cvs commit: xml-fop/src/java/org/apache/fop/datatypes IntegerType.java
From:       pbwest () apache ! org
Date:       2004-06-17 11:18:38
Message-ID: 20040617111838.13691.qmail () minotaur ! apache ! org
[Download RAW message or body]

pbwest      2004/06/17 04:18:38

  Modified:    src/java/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
                        IntegerType.java
  Log:
  Added static getIntValue(PropertyValue)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.3   +17 -2     xml-fop/src/java/org/apache/fop/datatypes/Attic/IntegerType.java
  
  Index: IntegerType.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Attic/IntegerType.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- IntegerType.java	19 Feb 2004 03:11:55 -0000	1.1.2.2
  +++ IntegerType.java	17 Jun 2004 11:18:38 -0000	1.1.2.3
  @@ -79,6 +79,21 @@
       }
   
       /**
  +     * Return the int value from a PropertyValue. 
  +     * @param pv
  +     * @return the int value
  +     * @exception PropertyException if the <code>PropertyValue</code> is not
  +     * an <code>IntegerType</code>
  +     */
  +    public static int getIntValue(PropertyValue pv)
  +    throws PropertyException {
  +        if (pv.getType() == PropertyValue.INTEGER) {
  +            return ((IntegerType)pv).getInt();
  +        }
  +        throw new PropertyException("PropertyValue not an INTEGER type");
  +    }
  +
  +    /**
        * validate the <i>IntegerType</i> against the associated property.
        */
       public void validate() throws PropertyException {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic