MCPcopy Index your code
hub / github.com/arduino/Arduino / get

Method get

app/src/processing/app/helpers/CircularBuffer.java:20–29  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

18 }
19
20 public double get(int index) {
21 if (index >= capacity) {
22 throw new IndexOutOfBoundsException();
23 }
24 if (index >= size()) {
25 throw new IndexOutOfBoundsException();
26 }
27
28 return elements[(start + index) % capacity];
29 }
30
31 public boolean isEmpty() {
32 return start == -1 && end == -1;

Callers 2

minMethod · 0.95
maxMethod · 0.95

Calls 1

sizeMethod · 0.95

Tested by

no test coverage detected