Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 45   Methods: 5
NCLOC: 21   Classes: 1
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover.
 
 Source file Conditionals Statements Methods TOTAL
UnsynchronizedStack.java - 100% 100% 100%
 1   
 /*
 2   
  * JBind
 3   
  *
 4   
  * Copyright (c) by Stefan Wachter. All rights reserved.
 5   
  *
 6   
  * Usage, modification, and redistribution is subject to license terms that are
 7   
  * available at 'http://www.jbind.org'. The JBind license is like the
 8   
  * 'Apache Software License V 1.1'.
 9   
  */
 10   
 /*
 11   
  */
 12   
 
 13   
 package org.jbind.util.collection;
 14   
 
 15   
 import java.util.ArrayList;
 16   
 import java.util.List;
 17   
 
 18   
 /**
 19   
  *
 20   
  */
 21   
 public class UnsynchronizedStack {
 22   
 
 23   
   private List stack = new ArrayList();
 24   
 
 25  1011
   public UnsynchronizedStack() {}
 26   
 
 27  16687
   public Object peek() {
 28  16687
     return stack.get(stack.size() - 1);
 29   
   }
 30   
 
 31  17321
   public void push(Object anObject) {
 32  17321
     stack.add(anObject);
 33   
   }
 34   
 
 35  17073
   public Object pop() {
 36  17073
     Object o = stack.get(stack.size() - 1);
 37  17073
     stack.remove(stack.size() - 1);
 38  17073
     return o;
 39   
   }
 40   
 
 41  7227
   public int size() {
 42  7227
     return stack.size();
 43   
   }
 44   
 }
 45