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

## org.apache.xerces.impl.xs.util
Class XSNamedMapImpl

    java.lang.Object
      |
      +--org.apache.xerces.impl.xs.util.XSNamedMapImpl

All Implemented Interfaces:
  org.apache.xerces.xs.XSNamedMap

Direct Known Subclasses:
  XSNamedMap4Types

public class XSNamedMapImpl
extends java.lang.Object
implements org.apache.xerces.xs.XSNamedMap

Containts the map between qnames and XSObject's.

# INTERNAL:

  Usage of this class is not supported. It may be altered or removed at any time.

Version:
  $Id: XSNamedMapImpl.java 446723 2006-09-15 20:37:45Z mrglavas $
Author:
  Sandy Gao, IBM

Field Summary
`static org.apache.xerces.xs.XSNamedMap` | `EMPTY_MAP` An immutable empty map.

Constructor Summary
`XSNamedMapImpl(java.lang.String[] namespaces, SymbolHash[] maps, int num)` Construct an XSNamedMap implmentation for a list of namespaces
`XSNamedMapImpl(java.lang.String namespace, SymbolHash map)` Construct an XSNamedMap implmentation for one namespace
`XSNamedMapImpl(org.apache.xerces.xs.XSObject[] array, int length)` Construct an XSNamedMap implmentation one namespace from an array

Method Summary
`int` | `getLength()` The number of `XSObjects` in the `XSObjectList`.
`org.apache.xerces.xs.XSObject` | `item(int index)` Returns the `index`th item in the map.
`org.apache.xerces.xs.XSObject` | `itemByName(java.lang.String namespace, java.lang.String localName)` Retrieves an `XSObject` specified by local name and namespace URI.

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

Field Detail

### EMPTY_MAP

    public static final org.apache.xerces.xs.XSNamedMap EMPTY_MAP

  An immutable empty map.

Constructor Detail

### XSNamedMapImpl

    public XSNamedMapImpl(java.lang.String namespace,
                          SymbolHash map)

  Construct an XSNamedMap implmentation for one namespace
  Parameters:
    `namespace` - the namespace to which the components belong
    `map` - the map from local names to components

### XSNamedMapImpl

    public XSNamedMapImpl(java.lang.String[] namespaces,
                          SymbolHash[] maps,
                          int num)

  Construct an XSNamedMap implmentation for a list of namespaces
  Parameters:
    `namespaces` - the namespaces to which the components belong
    `maps` - the maps from local names to components
    `num` - the number of namespaces

### XSNamedMapImpl

    public XSNamedMapImpl(org.apache.xerces.xs.XSObject[] array,
                          int length)

  Construct an XSNamedMap implmentation one namespace from an array
  Parameters:
    `array` - containing all components
    `length` - number of components

Method Detail

### getLength

    public int getLength()

  The number of `XSObjects` in the `XSObjectList`. The range of valid child node indices is 0 to `length-1` inclusive.
  Specified by:
    `getLength` in interface `org.apache.xerces.xs.XSNamedMap`

### itemByName

    public org.apache.xerces.xs.XSObject itemByName(java.lang.String namespace,
                                                    java.lang.String localName)

  Retrieves an `XSObject` specified by local name and namespace URI.
  Specified by:
    `itemByName` in interface `org.apache.xerces.xs.XSNamedMap`
  Parameters:
    `namespace` - The namespace URI of the `XSObject` to retrieve.
    `localName` - The local name of the `XSObject` to retrieve.
  Returns:
    A `XSObject` (of any type) with the specified local name and namespace URI, or `null` if they do not identify any `XSObject` in this map.

### item

    public org.apache.xerces.xs.XSObject item(int index)

  Returns the `index`th item in the map. The index starts at 0. If `index` is greater than or equal to the number of nodes in the list, this returns `null`.
  Specified by:
    `item` in interface `org.apache.xerces.xs.XSNamedMap`
  Parameters:
    `index` - The position in the map from which the item is to be retrieved.
  Returns:
    The `XSObject` at the `index`th position in the `XSNamedMap`, or `null` if that is not a valid index.

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

Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.