Package org.assertj.db.navigation
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 ofAbstractElement
and ofNavigation
).N
- The class of the next position where the navigation go (an sub-class ofAbstractElement
and ofNavigation
).D
- The class of the database element on which is the next position (an sub-class ofDbElement
).
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Returns the description at end point.protected abstract String
Returns the description at start point.protected N
getInstance
(D element) Gets an instance of element of navigation corresponding to the element in parameter.Gets an instance of element of navigation at end point.Gets an instance of element of navigation at start point.
-
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 pointatEndPoint
- The element at end point
-
-
Method Details
-
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
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
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
Returns the description at start point.- Returns:
- The description at start point
-
getDescriptionAtEndPoint
Returns the description at end point.- Returns:
- The description at end point
-