GStateStack.java
862 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.pdftoolkit.pdf.content.processor;
import com.adobe.internal.pdftoolkit.pdf.content.processor.GState;
import java.util.ArrayList;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public class GStateStack<T extends GState> {
private ArrayList<T> stack = new ArrayList();
public GStateStack(T gState) {
this.push(gState);
}
public void push(T gState) {
this.stack.add(gState);
}
public T pop() {
return (T)((GState)this.stack.remove(this.stack.size() - 1));
}
public T peek() {
if (!this.isEmpty()) {
return (T)((GState)this.stack.get(this.stack.size() - 1));
}
return null;
}
boolean isEmpty() {
return this.stack.isEmpty();
}
}