what-the-bank/sources/org/simpleframework/xml/stream/Stack.java

39 lines
666 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.simpleframework.xml.stream;
import java.util.ArrayList;
/* loaded from: classes.dex */
class Stack<T> extends ArrayList<T> {
public Stack(int i) {
super(i);
}
public T pop() {
int size = size();
if (size <= 0) {
return null;
}
return remove(size - 1);
}
public T top() {
int size = size();
if (size <= 0) {
return null;
}
return get(size - 1);
}
public T bottom() {
if (size() <= 0) {
return null;
}
return get(0);
}
public T push(T t) {
add(t);
return t;
}
}