Class PositionWithPoints<E extends AbstractElement<E> & Navigation,N extends AbstractElement<N> & Navigation,D extends DbElement>

java.lang.Object
org.assertj.db.navigation.PositionWithPoints<E,N,D>
Type Parameters:
E - The class of the actual position (an sub-class of AbstractElement and of Navigation).
N - The class of the next position where the navigation go (an sub-class of AbstractElement and of Navigation).
D - The class of the database element on which is the next position (an sub-class of DbElement).

public abstract class PositionWithPoints<E extends AbstractElement<E> & Navigation,N extends AbstractElement<N> & Navigation,D extends DbElement> extends Object
Position with point (start point and end point) during navigation.
Since:
1.1.0
Author:
Régis Pouiller
  • Constructor Details

    • PositionWithPoints

      public PositionWithPoints(E myself, Class<N> elementClass, Class<D> pointClass, D atStartPoint, D atEndPoint)
      Constructor.
      Parameters:
      myself - Actual value.
      elementClass - Class of the element of navigation (used to make instance).
      pointClass - Class of the database element at the next point (used to make instance).
      atStartPoint - The element at start point
      atEndPoint - The element at end point
  • Method Details

    • getInstanceAtStartPoint

      public N getInstanceAtStartPoint()
      Gets an instance of element of navigation at start point. If this instance is already instanced, the method returns it from the cache.
      Returns:
      The instance of element of navigation.
    • getInstanceAtEndPoint

      public N getInstanceAtEndPoint()
      Gets an instance of element of navigation at end point. If this instance is already instanced, the method returns it from the cache.
      Returns:
      The instance of element of navigation.
    • getInstance

      protected N getInstance(D element)
      Gets an instance of element of navigation corresponding to the element in parameter.
      Parameters:
      element - The element.
      Returns:
      The instance of element of navigation.
    • getDescriptionAtStartPoint

      protected abstract String getDescriptionAtStartPoint()
      Returns the description at start point.
      Returns:
      The description at start point
    • getDescriptionAtEndPoint

      protected abstract String getDescriptionAtEndPoint()
      Returns the description at end point.
      Returns:
      The description at end point