(T e)
| 58 | } |
| 59 | |
| 60 | @Override |
| 61 | public boolean offerFirst(T e) { |
| 62 | ensureCapacity(size() + 1); |
| 63 | modCount++; |
| 64 | |
| 65 | if (size > 0) { |
| 66 | // we don't need to move the head index for the first one |
| 67 | startIndex--; |
| 68 | if (startIndex < 0) { // wrapping to the end of the array |
| 69 | startIndex = dataArray.length - 1; |
| 70 | } |
| 71 | } |
| 72 | size++; |
| 73 | dataArray[startIndex] = e; |
| 74 | |
| 75 | return true; |
| 76 | } |
| 77 | |
| 78 | @Override |
| 79 | public boolean offerLast(T e) { |
nothing calls this directly
no test coverage detected