Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference 10g Release 2 (10.1.2) B14015-02
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jsp.jwcache
Class NumberSectionId

`java.lang.Object
oracle.jsp.jwcache.NumberSectionId`

All Implemented Interfaces:
  SectionId

public class NumberSectionId
extends java.lang.Object
implements SectionId

`NumberSectionId` is an id of a cache block or a cache section within a certain web page. Within the same web page, there may be multiple cache blocks. Nested cache blocks are allowed.

`NumberSectionId` is in a form of `N.N.N.N`, where `N` is a positive integer. The numbers of levels of integers and dots are corresponding to the nested level of cache block / section.

Actually, the form of section id here is very similar to the way that writers identify sections in technical documents. e.g. "1.", "2.1.", "2.3.1", "3.2".

`NumberSectionId` is usually maintained by java web cache tags automatically. Usually, java developers do not need to maintain this kind of SectionId, as opposed to `StringSectionId`.

Constructor Summary
`NumberSectionId()` Simple null constructor of `NumberSectionId` objects.
`NumberSectionId(NumberSectionId oid)` Copy constructor of `NumberSectionId` objects.

Method Summary
`void` | `inc()` increment the value of current level of section id by 1.
`void` | `popLevel()` decrement the levels of the section id by one to represent leaving the current nested level to a less nested level.
`void` | `pushLevel()` increment the levels of the section id by one to represent one more nested leve of cache block / section.
`java.lang.String` | `toString()` get the string of the section id.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### NumberSectionId

    public NumberSectionId()

  Simple null constructor of `NumberSectionId` objects. The initial value of the section id object constructed is "1.".

### NumberSectionId

    public NumberSectionId(NumberSectionId oid)

  Copy constructor of `NumberSectionId` objects.

Method Detail

### inc

    public void inc()

  increment the value of current level of section id by 1.

  e.g. "1." will become "2."; "1.3." will become "1.4.".

### pushLevel

    public void pushLevel()

  increment the levels of the section id by one to represent one more nested leve of cache block / section. The initial value of the new added level is 1.

  e.g. "1." will become "1.1."; "2.4." will become "2.4.1.".

### popLevel

    public void popLevel()

  decrement the levels of the section id by one to represent leaving the current nested level to a less nested level.

  e.g. "1.3" will become "1."; "4.2.3" will become "4.2".

  Invoking `popLevel()` on a single level `NumberSectionId` will cause an `IllegalStateException`.

### toString

    public java.lang.String toString()

  get the string of the section id.

  e.g. "1.", "2.", "1.4.3", and "2.3.1.5"

  Specified by:
    `toString` in interface `SectionId`
  Returns:
    the string of the section id

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference 10g Release 2 (10.1.2) B14015-02
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004, 2005, Oracle. All rights reserved.