code: public LoopTagStatus getLoopStatus() {
  
          // local implementation with reasonable default behavior
          class Status implements LoopTagStatus {
  
              /*
               * All our methods are straightforward.  We inherit
               * our JavaDoc from LoopTagSupport; see that class
               * for more information.
               */
  
              public Object getCurrent() {
                  /*
                   * Access the item through getCurrent() instead of just
                   * returning the item our containing class stores.  This
                   * should allow a subclass of LoopTagSupport to override
                   * getCurrent() without having to rewrite getLoopStatus() too.
                   */
                  return (LoopTagSupport.this.getCurrent());
              }
  
              public int getIndex() {
                  return (index + begin);       // our 'index' isn't getIndex()
              }
  
              public int getCount() {
                  return (count);
              }
  
              public boolean isFirst() {
                  return (index == 0);          // our 'index' isn't getIndex()
              }
  
              public boolean isLast() {
                  return (last);                // use cached value
              }
  
              public Integer getBegin() {
                  if (beginSpecified) {
                      return (new Integer(begin));
                  } else {
                      return null;
                  }
              }
  
              public Integer getEnd() {
                  if (endSpecified) {
                      return (new Integer(end));
                  } else {
                      return null;
                  }
              }
  
              public Integer getStep() {
                  if (stepSpecified) {
                      return (new Integer(step));
                  } else {
                      return null;
                  }
              }
          }
  
          /*
           * We just need one per invocation...  Actually, for the current
           * implementation, we just need one per instance, but I'd rather
           * not keep the reference around once release() has been called.
           */
          if (status == null) {
              status = new Status();
          }
  
          return status;
      }
docs: /*
  (Purposely inherit JavaDoc and semantics from LoopTag.
  Subclasses can override this method for more fine-grained control
  over LoopTagStatus, but an effort has been made to simplify
  implementation of subclasses that are happy with reasonable default
  behavior.)