jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core LoopTagStatus.java LoopTagSupport.java
Date Tue, 05 Mar 2002 17:08:25 GMT
shawn       02/03/05 09:08:25

  Modified:    standard/src/javax/servlet/jsp/jstl/core LoopTagStatus.java
                        LoopTagSupport.java
  Log:
  > As proposed by David:
  >   - Will remove the isXXXSpecified() methods
  >
  > As suggested by Shawn:
  >   - The get{Begin|End|Step} methods will return an Integer (instead of
  >     int),
  >     and have the value 'null' returned if undefined.
  >     This assumes, as noted by Shawn, that the EL handles 'Integer' as
  >     easily as 'int'.
  >     (and I believe we'll be ok there)
  
  Revision  Changes    Path
  1.3       +15 -48    jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagStatus.java
  
  Index: LoopTagStatus.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagStatus.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LoopTagStatus.java	4 Feb 2002 02:39:50 -0000	1.2
  +++ LoopTagStatus.java	5 Mar 2002 17:08:25 -0000	1.3
  @@ -132,63 +132,30 @@
       public boolean isLast();
   
       /**
  -     * Returns information about whether the 'begin' attribute was
  -     * specified.
  +     * Returns the value of the 'begin' attribute for the associated tag,
  +     * or null if no 'begin' attribute was specified.
        *
  -     * @return <tt>true</tt> if 'begin' was specified, <tt>false</tt>
  -     * otherwise.
  +     * @return the 'begin' value for the associated tag, or null
  +     * if no 'begin' attribute was specified
        */
  -    public boolean isBeginSpecified();
  +    public Integer getBegin();
   
       /**
  -     * Returns information about whether the 'end' attribute was
  -     * specified.
  +     * Returns the value of the 'end' attribute for the associated tag,
  +     * or null if no 'end' attribute was specified.
        *
  -     * @return <tt>true</tt> if 'end' was specified, <tt>false</tt>
  -     * otherwise.
  +     * @return the 'end' value for the associated tag, or null
  +     * if no 'end' attribute was specified
        */
  -    public boolean isEndSpecified();
  +    public Integer getEnd();
   
       /**
  -     * Returns information about whether the 'step' attribute was
  -     * specified.
  +     * Returns the value of the 'step' attribute for the associated tag,
  +     * or null if no 'step' attribute was specified.
        *
  -     * @return <tt>true</tt> if 'step' was specified, <tt>false</tt>
  -     * otherwise.
  +     * @return the 'step' value for the associated tag, or null
  +     * if no 'step' attribute was specified
        */
  -    public boolean isStepSpecified();
  -
  -    /**
  -     * Returns the value of the 'begin' attribute for the associated tag.  
  -     * If this attribute was not specified, the result is undefined.
  -     * (isBeginSpecified() should be called prior to this method to ensure
  -     * that the result is sensible.)
  -     *
  -     * @return the 'begin' value for the associated tag, or an undefined
  -     * value if this attribute was not specified.
  -     */
  -    public int getBegin();
  -
  -    /**
  -     * Returns the value of the 'end' attribute for the associated tag.  
  -     * If this attribute was not specified, the result is undefined.
  -     * (isEndSpecified() should be called prior to this method to ensure
  -     * that the result is sensible.)
  -     *
  -     * @return the 'end' value for the associated tag, or an undefined
  -     * value if this attribute was not specified.
  -     */
  -    public int getEnd();
  -
  -    /**
  -     * Returns the value of the 'step' attribute for the associated tag.  
  -     * If this attribute was not specified, the result is undefined.
  -     * (isStepSpecified() should be called prior to this method to ensure
  -     * that the result is sensible.)
  -     *
  -     * @return the 'step' value for the associated tag, or an undefined
  -     * value if this attribute was not specified.
  -     */
  -    public int getStep();
  +    public Integer getStep();
   
   }
  
  
  
  1.3       +15 -15    jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagSupport.java
  
  Index: LoopTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LoopTagSupport.java	4 Feb 2002 02:39:50 -0000	1.2
  +++ LoopTagSupport.java	5 Mar 2002 17:08:25 -0000	1.3
  @@ -419,23 +419,23 @@
               public boolean isLast() {
                   return (last);                // use cached value
               }
  -            public boolean isBeginSpecified() {
  -                return (beginSpecified);
  +            public Integer getBegin() {
  +                if (beginSpecified)
  +                    return (new Integer(begin));
  +                else
  +                    return null;
               }
  -            public boolean isEndSpecified() {
  -                return (endSpecified);
  +            public Integer getEnd() {
  +                if (endSpecified)
  +                    return (new Integer(end));
  +                else
  +                    return null;
               }
  -            public boolean isStepSpecified() {
  -                return (stepSpecified);
  -            }
  -            public int getBegin() {
  -                return (begin);
  -            }
  -            public int getEnd() {
  -                return (end);
  -            }
  -            public int getStep() {
  -                return (step);
  +            public Integer getStep() {
  +                if (stepSpecified)
  +                    return (new Integer(step));
  +                else
  +                    return null;
               }
           }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message