Class Navigation.Element

  • Enclosing class:
    Navigation

    public static class Navigation.Element
    extends java.lang.Object
    Navigation element.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Navigation.Element.Type
      Type of the navigation element
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Page getPage()
      Returns the underlying page.
      java.lang.String getPath()
      Returns the escaped path of the underlying page.
      java.lang.String getRawTitle()
      Returns the unescaped navigation title of the underlying page.
      java.lang.String getTitle()
      Returns the escaped navigation title of the underlying page.
      Navigation.Element.Type getType()
      Returns the element type.
      boolean hasChildren()
      Checks if the this element has children.
      boolean isCurrent()
      Checks if this element is the current one.
      boolean isFirst()
      Checks if this element is the first of it's siblings.
      boolean isLast()
      Checks if this element is the last of it's siblings.
      boolean isOnTrail()
      Checks if this element is on the trail.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPage

        public Page getPage()
        Returns the underlying page.
        Returns:
        the underlying page.
      • getPath

        public java.lang.String getPath()
        Returns the escaped path of the underlying page. Node that the path is escaped using Text.escape(String, char, boolean)
        Returns:
        the escaped path.
      • getRawTitle

        public java.lang.String getRawTitle()
        Returns the unescaped navigation title of the underlying page. if the page does not specific a navigation title, the title is used and ultimately it's name.
        Returns:
        the navigation title
        See Also:
        Page.getNavigationTitle(), Page.getTitle(), Page.getName()
      • isOnTrail

        public boolean isOnTrail()
        Checks if this element is on the trail. i.e. if the underlying page is the same or an ancestor of any degree of the current page, passed in the constructor of the navigation object.
        Returns:
        true if this element is on the trail.
      • isCurrent

        public boolean isCurrent()
        Checks if this element is the current one. i.e. if the underlying page is the same as current one, passed in the constructor of the navigation object.
        Returns:
        true if this element is the current one.
      • isFirst

        public boolean isFirst()
        Checks if this element is the first of it's siblings.
        Returns:
        true if this element is the first of it's siblings.
      • isLast

        public boolean isLast()
        Checks if this element is the last of it's siblings.
        Returns:
        true if this element is the last of it's siblings.