Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.eireneh.util
Class RobustList  view RobustList download RobustList.java

java.lang.Object
  extended bycom.eireneh.util.RobustList
All Implemented Interfaces:
java.io.Serializable

public class RobustList
extends java.lang.Object
implements java.io.Serializable

This is a version of LinkedList that is not fail-fast
Distribution Licence:
Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below.
The copyright to this program is held by it's authors.


Nested Class Summary
private  class RobustList.Entry
           
private  class RobustList.RobustListEnumeration
           
 
Field Summary
(package private)  RobustList.Entry foot
           
(package private)  RobustList.Entry head
           
protected static Logger log
          The log stream
(package private)  int size
           
(package private)  java.lang.Object sync
           
 
Constructor Summary
RobustList()
           
 
Method Summary
 void addElement(java.lang.Object o)
          Appends the specified element to the end of this list.
 void clear()
          Removes all of the elements from this list.
 boolean contains(java.lang.Object o)
          Does this list contains the specified element?
(package private)  void debug(java.lang.String title)
           
 java.lang.Object elementAt(int index)
          Returns the element at the specified position in this list.
 java.util.Enumeration elements()
          Returns a list-iterator of the elements in this list
private  RobustList.Entry findEntry(int index)
          Return the indexed entry.
 int indexOf(java.lang.Object o)
          Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element.
 void removeElement(int index)
          Removes the element at the specified position in this list.
 boolean removeElement(java.lang.Object o)
          Removes the first occurrence of the specified element in this list.
 int size()
          Returns the number of elements in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

head

RobustList.Entry head

foot

RobustList.Entry foot

size

int size

sync

java.lang.Object sync

log

protected static Logger log
The log stream

Constructor Detail

RobustList

public RobustList()
Method Detail

debug

void debug(java.lang.String title)

contains

public boolean contains(java.lang.Object o)
Does this list contains the specified element?


size

public int size()
Returns the number of elements in this list.


addElement

public void addElement(java.lang.Object o)
Appends the specified element to the end of this list.


removeElement

public void removeElement(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.


removeElement

public boolean removeElement(java.lang.Object o)
Removes the first occurrence of the specified element in this list. If the list does not contain the element, it is unchanged.


clear

public void clear()
Removes all of the elements from this list.


elementAt

public java.lang.Object elementAt(int index)
Returns the element at the specified position in this list.


findEntry

private RobustList.Entry findEntry(int index)
Return the indexed entry.


indexOf

public int indexOf(java.lang.Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element.


elements

public java.util.Enumeration elements()
Returns a list-iterator of the elements in this list