Class Visit<R>

java.lang.Object
org.apache.wicket.util.visit.Visit<R>
Type Parameters:
R - type of object that should be returned by the visit/traversal
All Implemented Interfaces:
IVisit<R>

public class Visit<R> extends Object implements IVisit<R>
Implementation of IVisit used by traversal algorithms
Author:
igor.vaynberg
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Prevents the visitor from visiting any children of the object currently visited
    Gets the result of the visit/traversal.
    boolean
    Checks if the visit/traversal should continue
    boolean
    Checks if the visit/traversal has been stopped from visiting children of the currently visited object
    boolean
    Checks if the visit/traversal has been stopped
    void
    Stops the visit/traversal
    void
    stop(R result)
    Stops the visit/traversal and returns result

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • stop

      public void stop()
      Stops the visit/traversal
      Specified by:
      stop in interface IVisit<R>
    • stop

      public void stop(R result)
      Stops the visit/traversal and returns result
      Specified by:
      stop in interface IVisit<R>
    • dontGoDeeper

      public void dontGoDeeper()
      Prevents the visitor from visiting any children of the object currently visited
      Specified by:
      dontGoDeeper in interface IVisit<R>
    • isStopped

      public boolean isStopped()
      Checks if the visit/traversal has been stopped
      Returns:
      true if the visit/traversal has been stopped
    • isContinue

      public boolean isContinue()
      Checks if the visit/traversal should continue
      Returns:
      true if the visit/traversal should continue
    • isDontGoDeeper

      public boolean isDontGoDeeper()
      Checks if the visit/traversal has been stopped from visiting children of the currently visited object
      Returns:
      true if the visit/traversal should not visit children of the currently visited object
    • getResult

      public R getResult()
      Gets the result of the visit/traversal. This value is set using stop(Object) or remains null if visit/traversal has ended in any other way
      Returns:
      value that should be returned to the method that initiated the visit/traversal