travis-ci
44 of 44 new or added lines in 3 files covered. (100.0%)
1383 of 2407 relevant lines covered (57.46%)
0.57 hits per line
1 |
package com.thenewmotion.ocpp.json.api |
|
2 |
|
|
3 |
trait CallIdGenerator extends Iterator[String] { |
|
4 |
def hasNext = true
|
|
5 |
def next(): String |
|
6 |
} |
|
7 |
|
|
8 |
object CallIdGenerator { |
1 all except ✔ |
9 |
def apply() = new AtomicCallIdGenerator
|
3 all except ✔ |
10 |
} |
4 all except ✔ |
11 |
|
5 all except ✔ |
12 |
class AtomicCallIdGenerator extends CallIdGenerator { |
10 all except ✔ |
13 |
private val id = new java.util.concurrent.atomic.AtomicLong(-1) |
8 all except ✔ |
14 |
|
5 all except ✔ |
15 |
def next() = id.incrementAndGet.toHexString |
9 all except ✔ |
16 |
} |
7 all except ✔ |