Class mheg5.UTL.List
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mheg5.UTL.List

java.lang.Object
   |
   +----mheg5.UTL.List

public class List
extends Object
implements Iterator, Cloneable

Constructor Index

 o List()
Constructor of the List
(using default initial size and default extension size )
 o List(int)
Constructor of List with start size
 o List(int, int)
Constructor of the list with start size an extension size

Method Index

 o Append(ListNode)
method to Append a ListNode object at the end of the list
 o Clear()
method to remove all objects from the list
 o Delete(ListNode)
method to Delete a ListNode object from the list
 o GetHead()
method to get the head ListNode
 o GetNext(ListNode)
method to get the ListNode after ln
 o GetPrev(ListNode)
method to get the ListNode before ln
 o getSize()
 o GetTail()
method to get the tail ListNode
 o InitIteration()
Initialize regular iteration over the elements of an ordered structure
 o InitIterationReverse()
Initialize reverse iteration over the elements of an ordered structure
 o InsertAfter(ListNode, ListNode)
method to Insert a ListNode ln after ListNode after
 o InsertBefore(ListNode, ListNode)
method to Insert a ListNode ln after ListNode before
 o IsElement(ListNode)
method to check if ListNode ln is an item of the list
 o NextIteration()
Iteration over the elements of a structure
 o Prepend(ListNode)
method to Prepend a ListNode object at the end of the list
 o toString()
overloading of the Object.toString function

Constructors

 o List
  public List()
Constructor of the List
(using default initial size and default extension size )
Returns:
an instance of List
 o List
  public List(int startSize)
Constructor of List with start size
Parameters:
startSize - (the initial size of the preallocated for listobjects)
Returns:
an instance of List
 o List
  public List(int startSize,
              int extSize)
Constructor of the list with start size an extension size
Parameters:
startSize - ( the initial size of the preallocated space for listobjects)
extSize - ( the increasement of the space in the underlying array implementation )
Returns:
an instance of List

Methods

 o getSize
  public int getSize()
 o Append
  public void Append(ListNode ln)
method to Append a ListNode object at the end of the list
Parameters:
ln - ( the object to append )
 o Prepend
  public void Prepend(ListNode ln)
method to Prepend a ListNode object at the end of the list
Parameters:
ln - ( the object to prepend )
 o InsertAfter
  public void InsertAfter(ListNode ln,
                          ListNode after)
method to Insert a ListNode ln after ListNode after
Parameters:
ln - ( the object to insert )
after - ( the object after to insert )
 o InsertBefore
  public void InsertBefore(ListNode ln,
                           ListNode before)
method to Insert a ListNode ln after ListNode before
Parameters:
ln - ( the object to insert )
before - ( the object before to insert )
 o Delete
  public void Delete(ListNode ln)
method to Delete a ListNode object from the list
Parameters:
ln - ( the ListNode to be deleted )
 o GetNext
  public ListNode GetNext(ListNode ln)
method to get the ListNode after ln
Parameters:
ln - the next listnode to get
Returns:
ListNode ( ln if exists, else null )
 o GetPrev
  public ListNode GetPrev(ListNode ln)
method to get the ListNode before ln
Parameters:
ln - the pre listnode to get
Returns:
ListNode ( ln if exists, else null )
 o GetHead
  public ListNode GetHead()
method to get the head ListNode
Returns:
ListNode ( ln if exists, else null )
 o GetTail
  public ListNode GetTail()
method to get the tail ListNode
Returns:
ListNode ( ln if exists, else null )
 o IsElement
  public boolean IsElement(ListNode ln)
method to check if ListNode ln is an item of the list
Parameters:
ln - ( the node to check )
Returns:
true if ln is in the List, false else
 o Clear
  public void Clear()
method to remove all objects from the list
 o InitIteration
  public void InitIteration()
Initialize regular iteration over the elements of an ordered structure
 o InitIterationReverse
  public void InitIterationReverse()
Initialize reverse iteration over the elements of an ordered structure
 o NextIteration
  public Object NextIteration()
Iteration over the elements of a structure
Returns:
Object (the next object of the iteration or null )
 o toString
  public String toString()
overloading of the Object.toString function
Returns:
returns the textual representation of the list
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index