Sequence - classSequence cfw_ /*

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
class Sequence  /**  * Initializes this Sequence object to be empty, with an initial capacity of ten  * elements.  */  public Sequence()   /**  * Initializes this Sequence object to be empty, with a specified initial  * capacity.  * @param capacity  the initial capacity of this Sequence object.  * @throw IllegalArgumentException  if capacity is non-positive.  */  public Sequence (int n)  /**  * Returns the number of elements in this Sequence object.  * @return the number of elements in this Sequence object.  */  public int size()  /**  * Appends a specified element to this Sequence object. 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
* @param element  the element to be inserted at the end of this  * Sequence object.  */  public void append (E element)  /**  * Returns the element at a specified index in this Sequence object.  * The worstTime(n) is constant, where n is the number of elements in this 
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/08/2011 for the course COMPUTERS 100 taught by Professor Sinha during the Spring '05 term at IIT Kanpur.

Page1 / 3

Sequence - classSequence cfw_ /*

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online