~cpn-gui/tapaal/transitionEditorPanel

« back to all changes in this revision

Viewing changes to src/dk/aau/cs/model/tapn/Colored/ExpressionSupport/ExprStringPosition.java

  • Committer: Mark Glavind
  • Date: 2018-11-22 13:52:57 UTC
  • Revision ID: mglavi14@student.aau.dk-20181122135257-eoz72bs0edm76x0u
WIP on Guards for transitions

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package dk.aau.cs.model.tapn.Colored.ExpressionSupport;
 
2
 
 
3
import dk.aau.cs.model.tapn.Colored.Expressions.Expression;
 
4
 
 
5
public class ExprStringPosition {
 
6
 
 
7
    private int startIndex;
 
8
    private int endIndex;
 
9
    private Expression object;
 
10
 
 
11
    public ExprStringPosition(int startIndex, int endIndex, Expression object) {
 
12
        this.startIndex = startIndex;
 
13
        this.endIndex = endIndex;
 
14
        this.object = object;
 
15
    }
 
16
 
 
17
    public int getStart() {
 
18
        return startIndex;
 
19
    }
 
20
 
 
21
    public int getEnd() {
 
22
        return endIndex;
 
23
    }
 
24
 
 
25
    public ExprStringPosition addOffset(int offset) {
 
26
        startIndex += offset;
 
27
        endIndex += offset;
 
28
        return this;
 
29
    }
 
30
 
 
31
    public Expression getObject() {
 
32
        return object;
 
33
    }
 
34
 
 
35
}