MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / addFirst

Method addFirst

src/main/java/net/optifine/util/LinkedList.java:11–26  ·  view source on GitHub ↗
(LinkedList.Node<T> tNode)

Source from the content-addressed store, hash-verified

9 private int size;
10
11 public void addFirst(LinkedList.Node<T> tNode) {
12 this.checkNoParent(tNode);
13
14 if (this.isEmpty()) {
15 this.first = tNode;
16 this.last = tNode;
17 } else {
18 LinkedList.Node<T> node = this.first;
19 tNode.setNext(node);
20 node.setPrev(tNode);
21 this.first = tNode;
22 }
23
24 tNode.setParent(this);
25 ++this.size;
26 }
27
28 public void addLast(LinkedList.Node<T> tNode) {
29 this.checkNoParent(tNode);

Callers 6

mainMethod · 0.95
addAfterMethod · 0.95
processCommandMethod · 0.80
addEntryMethod · 0.80
getByUUIDMethod · 0.80

Calls 5

checkNoParentMethod · 0.95
isEmptyMethod · 0.95
setNextMethod · 0.80
setPrevMethod · 0.80
setParentMethod · 0.80

Tested by 1

mainMethod · 0.76