I have something like this: 

```
    public class TestItem {

        double priority;
        String name;
        String phoneNumber;

        //getter setters
        .
        .
        .

        //action
        public void moveOrder(TestItem before, TestItem after) {

        }
    }

```

I wanted to implement reordering of my list by dragging the list in between the desired items.
Assuming this is my list. 

```
    TestItem 1 (priority = 1)
    TestItem 2 (priority = 2)
    TestItem 3 (priority = 3)
    TestItem 4 (priority = 4)
    TestItem 5 (priority = 5)

```

If I want to move TestItem 4 in between 1 and 2, it will become like this:

```
    TestItem 1 (priority = 1)
    TestItem 4 (priority = 1.5)
    TestItem 2 (priority = 2)
    TestItem 3 (priority = 3)

    TestItem 5 (priority = 5)

```

TestItem 4's order is the average of 1 and 2.
My problem is when i keep on reordering, the value of the order becomes smaller.

I dont have any idea yet as to how to correct whenever it reach a something value.
Maybe should I retrieve all the list again? Are there reference as to something implemented like this? 

Any suggestion or references is greatly appreciated.