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

leeonky / test-charm-java / 212

14 Apr 2025 05:15AM UTC coverage: 74.088% (-0.1%) from 74.209%
212

push

circleci

leeonky
Update version

7957 of 10740 relevant lines covered (74.09%)

0.74 hits per line

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

72.73
/DAL-java/src/main/java/com/github/leeonky/dal/ast/opt/DALOperator.java
1
package com.github.leeonky.dal.ast.opt;
2

3
import com.github.leeonky.dal.ast.node.DALExpression;
4
import com.github.leeonky.dal.ast.node.DALNode;
5
import com.github.leeonky.dal.runtime.Data;
6
import com.github.leeonky.dal.runtime.Operators;
7
import com.github.leeonky.dal.runtime.RuntimeContextBuilder.DALRuntimeContext;
8
import com.github.leeonky.interpreter.Operator;
9

10
public abstract class DALOperator extends Operator<DALRuntimeContext, DALNode, DALOperator, DALExpression> {
11
    private final boolean needInspect;
12
    private final Operators type;
13

14
    protected DALOperator(int precedence, String label, boolean needInspect, Operators type) {
15
        super(precedence, label);
1✔
16
        this.needInspect = needInspect;
1✔
17
        this.type = type;
1✔
18
    }
1✔
19

20
    public Data calculateData(DALExpression expression, DALRuntimeContext context) {
21
        return context.data(calculate(expression, context));
×
22
    }
23

24
    @Override
25
    public Object calculate(DALExpression expression, DALRuntimeContext context) {
26
        return calculateData(expression, context).instance();
×
27
    }
28

29
    public boolean isNeedInspect() {
30
        return needInspect;
×
31
    }
32

33
    public String inspect(String node1, String node2) {
34
        if (node1 == null || node1.isEmpty())
1✔
35
            return String.format("%s %s", label, node2);
1✔
36
        return String.format("%s %s %s", node1, label, node2);
1✔
37
    }
38

39
    public Operators overrideType() {
40
        return type;
1✔
41
    }
42
}
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

© 2026 Coveralls, Inc