Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portal.tools.resource
Class ResourceIDBuilder.ParseContext

    java.lang.Object
      com.bea.portal.tools.resource.ResourceIDBuilder.ParseContext

Enclosing class:
  ResourceIDBuilder<T extends ResourceID>

    protected static class ResourceIDBuilder.ParseContext

extends Object

Context for parsing a resource URN.

Constructor Summary
`protected` | `ResourceIDBuilder.ParseContext(String chars, int start, int end)` Constructor.

Method Summary
`void` | `append(int ch)` Append the given character to the token buffer.
`void` | `clearTokenBuffer()` Clear the current token buffer.
`String` | `getRest()` Get the portion of the resource URN from the cursor to the end of the resource URN.
`String` | `getToken()` Get the current token.
`String` | `getTokenAndClear()` Get a copy of the current token buffer and clear the current token buffer.
`StringBuilder` | `getTokenBuffer()` Get a copy of the current token buffer.
`StringBuilder` | `getTokenBufferAndClear()` Get a copy of the current token buffer and clear the current token buffer.
`boolean` | `isAtEnd()` Determine if the cursor is at the end of the resource URN.
`int` | `read()` Read the next character from the resource URN.
`boolean` | `read(int ch)` Read the next character from the resource URN if it matches the given character.
`void` | `reset()` Reset the cursor to the first character of the resource URN.
`int` | `scanUntil(String delimiterChars)` Read the next characters from the resource URN until a character in the given set of delimiter characters is found.

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

Constructor Detail

### ResourceIDBuilder.ParseContext

    protected ResourceIDBuilder.ParseContext(String chars,
                                             int start,
                                             int end)

  Constructor.

  Parameters
    `chars` - characters of the resource URN
    `start` - the index of the first character in `chars` of the resource URN
    `end` - the index one past the last character in `chars` of the resource URN

Method Detail

### reset

    public final void reset()

  Reset the cursor to the first character of the resource URN.

### isAtEnd

    public final boolean isAtEnd()

  Determine if the cursor is at the end of the resource URN.

  Returns
    `true` if the cursor is at the end of the resource URN and `false` otherwise

### read

    public final int read()

  Read the next character from the resource URN.

  Returns
    the next character from the resource URN or `-1` if the cursor is at the end of the resource URN

### read

    public final boolean read(int ch)

  Read the next character from the resource URN if it matches the given character.

  Parameters
    `ch` - the character to match
  Returns
    `true` if the next character from the resource URN matched the given character

### scanUntil

    public final int scanUntil(String delimiterChars)

  Read the next characters from the resource URN until a character in the given set of delimiter characters is found.

  Parameters
    `delimiterChars` - a string containing the set of delimiter characters
  Returns
    the index in `delimiterChars` of the character from the resource URN that matched or `-1` if the end of the resource URN was encountered before a character in the given set of delimiter characters was found

### append

    public final void append(int ch)

  Append the given character to the token buffer.

  Parameters
    `ch` - the character buffer

### getToken

    public final String getToken()

  Get the current token.

  The current token buffer is not changed.

  Returns
    a copy of the current token buffer

### getTokenBuffer

    public final StringBuilder getTokenBuffer()

  Get a copy of the current token buffer.

  The current token buffer is not changed.

  Returns
    a copy of the current token buffer

### getTokenAndClear

    public final String getTokenAndClear()

  Get a copy of the current token buffer and clear the current token buffer.

  Returns
    a copy of the current token buffer

### getTokenBufferAndClear

    public final StringBuilder getTokenBufferAndClear()

  Get a copy of the current token buffer and clear the current token buffer.

  Returns
    a copy of the current token buffer

### clearTokenBuffer

    public final void clearTokenBuffer()

  Clear the current token buffer.

### getRest

    public final String getRest()

  Get the portion of the resource URN from the cursor to the end of the resource URN.

  Returns
    the portion of the resource URN from the cursor to the end of the resource URN

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.