Back to project page RemindEm.
The source code is released under:
MIT License
If you think the Android project RemindEm listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.brandtapps.remindem.extras; /*from w ww .ja v a 2 s .c om*/ import java.util.List; import java.util.ArrayList; public class StackSpecial { private List<Special> stack; public StackSpecial() { stack = new ArrayList<Special>(); } public void push(Special i) { stack.add(0,i); } public Special pop() { if(!stack.isEmpty()){ Special i= stack.get(0); stack.remove(0); return i; } else{ return null;// Or any invalid value } } public Special peek() { if(!stack.isEmpty()){ return stack.get(0); } else{ return null;// Or any invalid value } } public boolean isEmpty() { return stack.isEmpty(); } }