PosnStack.java
890 Bytes
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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.text;
import com.adobe.xfa.text.TextPosn;
import com.adobe.xfa.text.TextPosnBase;
import com.adobe.xfa.ut.Storage;
class PosnStack
extends Storage<TextPosn> {
static final long serialVersionUID = 4437578512627526202L;
PosnStack() {
}
PosnStack(PosnStack source) {
int depth = source.size();
this.ensureCapacity(depth);
for (int i = 0; i < depth; ++i) {
this.add(new TextPosn((TextPosn)source.get(i)));
}
}
TextPosn top() {
return (TextPosn)this.last();
}
void push(TextPosnBase oPosn) {
this.add(new TextPosn(oPosn));
}
TextPosnBase pop() {
TextPosn oResult = null;
if (this.size() > 0) {
oResult = (TextPosn)this.last();
this.removeLast();
}
return oResult;
}
}