MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / CircularQueue

Method CircularQueue

validating/CircularQueue.java:16–20  ·  view source on GitHub ↗
(int size)

Source from the content-addressed store, hash-verified

14 // Has it wrapped around the circular queue?
15 private boolean wrapped = false;
16 public CircularQueue(int size) {
17 data = new Object[size];
18 // Must be true after construction:
19 assert invariant();
20 }
21 public boolean empty() {
22 return !wrapped && in == out;
23 }

Callers

nothing calls this directly

Calls 1

invariantMethod · 0.95

Tested by

no test coverage detected