1 19 package bak.pcj.list; 20 21 import bak.pcj.CharCollection; 22 23 33 public class CharArrayStack extends CharArrayList implements CharStack { 34 35 41 public CharArrayStack() { 42 super(); 43 } 44 45 57 public CharArrayStack(CharCollection c) { 58 super(c); 59 } 60 61 75 public CharArrayStack(char[] a) { 76 super(a); 77 } 78 79 91 public CharArrayStack(int capacity) { 92 super(capacity); 93 } 94 95 114 public CharArrayStack(int capacity, double growthFactor) { 115 super(capacity, growthFactor); 116 } 117 118 137 public CharArrayStack(int capacity, int growthChunk) { 138 super(capacity, growthChunk); 139 } 140 141 public void push(char v) 142 { add(v); } 143 144 public char pop() 145 { return removeElementAt(size()-1); } 146 147 public char peek() 148 { return get(size()-1); } 149 150 } | Popular Tags |