Package org.zkoss.zuti.zul

## Interface NavigationLevel<T>

- Type Parameters:
    `T` - The data type

      public interface NavigationLevel<T>

  An object that represents the navigation level.
  Since:
    8.6.0
  Author:
    rudyhuang

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `NavigationLevel<T>` | `getChild()` | Gets the child navigation level if any.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getContext()` | Gets the context of this level if any.
    `T` | `getCurrent()` | Gets the data associated with the current key if any.
    `java.lang.String` | `getCurrentKey()` | Gets the current key.
    `java.util.Iterator<Pair<java.lang.String,​T>>` | `getItemIterator()` | Gets the item iterator in this level.
    `java.util.List<Pair<java.lang.String,​T>>` | `getItems()` | Gets the list of items in this level.
    `int` | `getLevel()` | Gets the level number.
    `NavigationLevel<T>` | `navigateTo​(java.lang.String key)` | Navigates to the specified key in the current level.
    `NavigationLevel<T>` | `setContext​(java.util.Map<java.lang.String,​java.lang.Object> context)` | Sets the context of this level.

- - ### Method Detail

    - #### getLevel

          int getLevel()

      Gets the level number. The first level is 1.
      Returns:
        the level number

    - #### getContext

          java.util.Map<java.lang.String,​java.lang.Object> getContext()

      Gets the context of this level if any.
      Returns:
        the context map. Might be `null`

    - #### setContext

          NavigationLevel<T> setContext​(java.util.Map<java.lang.String,​java.lang.Object> context)

      Sets the context of this level.
      Parameters:
        `context` - the context map
      Returns:
        this object

    - #### getCurrentKey

          java.lang.String getCurrentKey()

      Gets the current key. If no data exists in this level, the result is `null`.
      Returns:
        the current key. Might be `null`

    - #### getCurrent

          T getCurrent()

      Gets the data associated with the current key if any.
      Returns:
        the data object. Might be `null`

    - #### getChild

          NavigationLevel<T> getChild()

      Gets the child navigation level if any.
      Returns:
        the child navigation level. Might be `null`

    - #### navigateTo

          NavigationLevel<T> navigateTo​(java.lang.String key)

      Navigates to the specified key in the current level. If the specified key does not exist, it will throw an exception.
      Parameters:
        `key` - the item key
      Returns:
        this object
      Throws:
        `java.lang.IllegalArgumentException` - if the key is invalid or not found in the level

    - #### getItemIterator

          java.util.Iterator<Pair<java.lang.String,​T>> getItemIterator()

      Gets the item iterator in this level. The `Pair.getX()` is the key, and `Pair.getY()` is the data.
      Returns:
        the item iterator

    - #### getItems

          java.util.List<Pair<java.lang.String,​T>> getItems()

      Gets the list of items in this level. Note: The performance is no good.
      Returns:
        the list of items