• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mybatis / velocity-scripting / #375

24 Sep 2023 01:30AM CUT coverage: 82.545%. Remained the same
#375

Pull #187

github

web-flow
Merge 833f74f79 into df890ab13
Pull Request #187: Update dependency org.mybatis:mybatis-parent to v39

506 of 613 relevant lines covered (82.54%)

0.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.75
/src/main/java/org/mybatis/scripting/velocity/FastLinkedList.java
1
/*
2
 *    Copyright 2012-2022 the original author or authors.
3
 *
4
 *    Licensed under the Apache License, Version 2.0 (the "License");
5
 *    you may not use this file except in compliance with the License.
6
 *    You may obtain a copy of the License at
7
 *
8
 *       https://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *    Unless required by applicable law or agreed to in writing, software
11
 *    distributed under the License is distributed on an "AS IS" BASIS,
12
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *    See the License for the specific language governing permissions and
14
 *    limitations under the License.
15
 */
16
package org.mybatis.scripting.velocity;
17

18
import java.io.Serializable;
19

20
/**
21
 * Paranoiac small and fast forward only list
22
 */
23
public final class FastLinkedList<E extends Serializable> implements Serializable {
24

25
  private static final long serialVersionUID = 1L;
26

27
  private Node first;
28

29
  private Node last;
30

31
  public FastLinkedList() {
1✔
32
    this.last = this.first;
1✔
33
  }
1✔
34

35
  public boolean isEmpty() {
36
    return this.first == null;
1✔
37
  }
38

39
  public Node start() {
40
    return this.first;
1✔
41
  }
42

43
  public void add(E e) {
44
    final Node n = new Node(e);
1✔
45
    if (this.first == null) {
1✔
46
      this.first = n;
1✔
47
      this.last = this.first;
1✔
48
    } else {
49
      this.last.next = n;
1✔
50
      this.last = n;
1✔
51
    }
52
  }
1✔
53

54
  public final class Node {
55

56
    final E data;
57
    Node next;
58

59
    public Node(E newData) {
1✔
60
      this.data = newData;
1✔
61
    }
1✔
62

63
    public boolean hasNext() {
64
      return this.next != null;
×
65
    }
66

67
  }
68

69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc