Class WalkResult<R,​G,​E>

  • Type Parameters:
    R - Root class, owner of group.
    G - Group class.
    E - Elements class.
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Object>

    public class WalkResult<R,​G,​E>
    extends java.lang.Object
    implements java.lang.Iterable<java.lang.Object>, java.io.Serializable
    An object of this class is returned when WalkIterator is used.
    Author:
    Copyright (c) 2014-2024 Piketec GmbH - MIT License (MIT) - All rights reserved
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      WalkResult​(R root, java.util.List<G> groups, java.util.List<E> elements)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<E> getElements()  
      java.util.List<G> getGroups()  
      R getRoot()  
      java.util.Iterator<java.lang.Object> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • WalkResult

        public WalkResult​(R root,
                          java.util.List<G> groups,
                          java.util.List<E> elements)
        Parameters:
        root - Element where the search started.
        groups - List of groups under the root.
        elements - List of elements under the root.
    • Method Detail

      • getRoot

        public R getRoot()
        Returns:
        Returns root node.
      • getGroups

        public java.util.List<G> getGroups()
        Returns:
        Returns the list of groups underlying the root.
      • getElements

        public java.util.List<E> getElements()
        Returns:
        Returns the list of elements underlying the root.
      • iterator

        public java.util.Iterator<java.lang.Object> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<R>