Interface TargetPosition

    • Method Detail

      • transformByChange

        TargetPosition transformByChange​(int pos,
                                         int removedSize,
                                         int addedSize)
        When the list of items, those displayed in the viewport, and those that are not, are modified, transforms this change to account for those modifications.
        Parameters:
        pos - the cell index where the change begins
        removedSize - the amount of cells that were removed, starting from pos
        addedSize - the amount of cells that were added, starting from pos
      • accept

        void accept​(TargetPositionVisitor visitor)
        Visitor Pattern: prevents type-checking the implementation
      • clamp

        TargetPosition clamp​(int size)
        Insures this position's item index is between 0 and size