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 Details

    • getLevel

      int getLevel()
      Gets the level number. The first level is 1.
      Returns:
      the level number
    • getContext

      Map<String,Object> getContext()
      Gets the context of this level if any.
      Returns:
      the context map. Might be null
    • setContext

      NavigationLevel<T> setContext(Map<String,Object> context)
      Sets the context of this level.
      Parameters:
      context - the context map
      Returns:
      this object
    • getCurrentKey

      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
    • getItemIterator

      Iterator<org.zkoss.util.Pair<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

      List<org.zkoss.util.Pair<String,T>> getItems()
      Gets the list of items in this level. Note: The performance is no good.
      Returns:
      the list of items