Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MolinDeng/Princeton-algs4
/ validate
Method
validate
02Lab-Queues/Deque.java:40–42 ·
view source on GitHub ↗
(Item item)
Source
from the content-addressed store, hash-verified
38
}
39
40
private
void
validate(Item item) {
41
if
(item == null) throw
new
IllegalArgumentException(
"Item is null"
);
42
}
43
44
// add the item to the front
45
public
void
addFirst(Item item) {
Callers
2
addFirst
Method · 0.95
addLast
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected