ChildReln.java
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa;
import com.adobe.xfa.ut.ExFull;
import com.adobe.xfa.ut.ResId;
public class ChildReln {
public static final int oneOfChild = 4;
public static final int oneOrMore = 3;
public static final int UNLIMITED = -1;
public static final int zeroOrMore = 2;
public static final int zeroOrOne = 1;
private static final ChildReln goOneOfChild = new ChildReln(4, 1);
private static final ChildReln goOneOrMore = new ChildReln(3, 1);
private static final ChildReln goZeroOrMore = new ChildReln(2, 1);
private static final ChildReln goZeroOrOne = new ChildReln(1, 1);
private final int meOccurrence;
private final int mnMaxOccurrence;
public static ChildReln getOneOfChild() {
return goOneOfChild;
}
public static ChildReln getOneOrMore() {
return goOneOrMore;
}
public static ChildReln getZeroOrMore() {
return goZeroOrMore;
}
public static ChildReln getZeroOrOne() {
return goZeroOrOne;
}
public ChildReln(int count, int nMax) {
this.meOccurrence = count;
assert (nMax != 0);
if ((this.meOccurrence == 3 || this.meOccurrence == 2) && nMax == 1) {
nMax = -1;
}
this.mnMaxOccurrence = nMax;
}
public int getMax() {
return this.mnMaxOccurrence;
}
public int getMin() {
switch (this.meOccurrence) {
case 1:
case 2:
case 4: {
return 0;
}
}
return 1;
}
public int getOccurrence() {
return this.meOccurrence;
}
public void init(int count, int nMax) {
throw new ExFull(ResId.UNSUPPORTED_OPERATION, "ChildReln#init");
}
public boolean isBaseClass() {
return true;
}
}