public double get(int index) {
    if (index < 0 || index >= size) {
      throw new IndexOutOfBoundsException();
    }
    return data[(head + index) % data.length];
  }
get value of given index.

@param index index
@return value to queue
library-udf/src/main/java/org/apache/iotdb/library/util/DoubleCircularQueue.java