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