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