Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: cd397dc70015553eba59377e466a2acd82874a9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
library NonNLSUtils;

property counter : Sequence(Integer) = Sequence{};

helper incrementNonNLSCounter() : OclVoid {
	counter := counter->including(counter->size() + 1);
	return null
}

helper resetNonNLSCounter() : OclVoid {
	counter := Sequence {  };
	return null
}

helper getNonNLSCounter() : Sequence(Integer) {
	return counter;
}

helper getNonNLSCounter(collection : Collection(OclAny)) : Sequence(Integer) {
	return collection->iterate(element : OclAny; acc : Sequence(Integer) = Sequence{} | acc->including(acc->size() + 1))
}

Back to the top