class IteratorArray {

    IteratorArray(int length, int point) {
        Preconditions.checkArgument(length > 0, "length must be positive!");
        Preconditions.checkArgument(point < length && point >= 0, "point out of range!");
        this.prevIndex = new int[length];
        this.nextIndex = new int[length];
        for (int i = 0; i < length; i++) {
            this.prevIndex[i] = i - 1;
            this.nextIndex[i] = i + 1;
        }
        this.nextIndex[length - 1] = -1;
        this.point = point;
    }

      IteratorArray(int length, int point);

}