com.rubecula.darwin.foundation
Class AuditableList<E extends net.sf.tostring0.IToString>

java.lang.Object
  extended by net.sf.tostring0.AToString
      extended by com.rubecula.darwin.foundation.AuditableList<E>
Type Parameters:
E -
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString
Direct Known Subclasses:
Genotype_

public class AuditableList<E extends net.sf.tostring0.IToString>
extends net.sf.tostring0.AToString
implements java.util.List<E>, net.sf.tostring0.Identifiable

This class is an auditable extension of Vector.

Version:
$Revision: 1.1 $
Author:
Robin Hillyard

Field Summary
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Constructor Summary
AuditableList(java.lang.String identifier)
           
AuditableList(java.lang.String identifier, java.util.List<E> list)
           
 
Method Summary
 boolean add(E o)
           
 void add(int index, E element)
           
 boolean addAll(java.util.Collection<? extends E> c)
           
 boolean addAll(int index, java.util.Collection<? extends E> c)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> c)
           
 boolean equals(java.lang.Object obj)
           
 E get(int index)
           
 java.lang.String getIdentifier()
           
protected  java.util.Collection<E> getList()
           
 int hashCode()
           
 int indexOf(java.lang.Object o)
           
 boolean isEmpty()
           
 java.util.Iterator<E> iterator()
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator<E> listIterator()
           
 java.util.ListIterator<E> listIterator(int index)
           
 E remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 E set(int index, E element)
           
protected  void setList(java.util.List<E> list)
          Used only by Object.clone().
 int size()
           
 java.util.List<E> subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class net.sf.tostring0.AToString
toString, toString, toStringBrief, toStringId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuditableList

public AuditableList(java.lang.String identifier)
Parameters:
identifier -

AuditableList

public AuditableList(java.lang.String identifier,
                     java.util.List<E> list)
Parameters:
identifier -
list -
Method Detail

add

public boolean add(E o)
Specified by:
add in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
add in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
o -
Returns:
result of calling List.add(Object) on _list.
See Also:
List.add(java.lang.Object)

add

public void add(int index,
                E element)
Specified by:
add in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
index -
element -
See Also:
List.add(int, java.lang.Object)

addAll

public boolean addAll(java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
addAll in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
c -
Returns:
result of calling List.addAll(Collection) on _list.
See Also:
List.addAll(java.util.Collection)

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
index -
c -
Returns:
result of calling List.addAll(int, Collection) on _list.
See Also:
List.addAll(int, java.util.Collection)

clear

public void clear()
Specified by:
clear in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
clear in interface java.util.List<E extends net.sf.tostring0.IToString>
See Also:
List.clear()

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
contains in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
o -
Returns:
result of calling List.contains(Object) on _list .
See Also:
List.contains(java.lang.Object)

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
containsAll in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
c -
Returns:
result of calling List.containsAll(Collection) on _list.
See Also:
List.containsAll(java.util.Collection)

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
equals in interface java.util.List<E extends net.sf.tostring0.IToString>
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

get

public E get(int index)
Specified by:
get in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
index -
Returns:
result of calling List.get(int) on _list.
See Also:
List.get(int)

getIdentifier

public java.lang.String getIdentifier()
Specified by:
getIdentifier in interface net.sf.tostring0.Identifiable
See Also:
Identifiable.getIdentifier()

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
hashCode in interface java.util.List<E extends net.sf.tostring0.IToString>
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
o -
Returns:
result of calling List.indexOf(Object) on _list.
See Also:
List.indexOf(java.lang.Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
isEmpty in interface java.util.List<E extends net.sf.tostring0.IToString>
Returns:
result of calling List.isEmpty() on _list.
See Also:
List.isEmpty()

iterator

public java.util.Iterator<E> iterator()
Specified by:
iterator in interface java.lang.Iterable<E extends net.sf.tostring0.IToString>
Specified by:
iterator in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
iterator in interface java.util.List<E extends net.sf.tostring0.IToString>
Returns:
result of calling List.iterator() on _list.
See Also:
List.iterator()

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
o -
Returns:
result of calling List.lastIndexOf(Object) on _list.
See Also:
List.lastIndexOf(java.lang.Object)

listIterator

public java.util.ListIterator<E> listIterator()
Specified by:
listIterator in interface java.util.List<E extends net.sf.tostring0.IToString>
Returns:
result of calling List.listIterator() on _list.
See Also:
List.listIterator()

listIterator

public java.util.ListIterator<E> listIterator(int index)
Specified by:
listIterator in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
index -
Returns:
result of calling List.listIterator(int) on _list.
See Also:
List.listIterator(int)

remove

public E remove(int index)
Specified by:
remove in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
index -
Returns:
result of calling List.remove(int) on _list.
See Also:
List.remove(int)

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
remove in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
o -
Returns:
result of calling List.remove(Object) on _list.
See Also:
List.remove(java.lang.Object)

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
removeAll in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
c -
Returns:
result of calling List.removeAll(Collection) on _list.
See Also:
List.removeAll(java.util.Collection)

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
retainAll in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
c -
Returns:
result of calling List.retainAll(Collection) on _list.
See Also:
List.retainAll(java.util.Collection)

set

public E set(int index,
             E element)
Specified by:
set in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
index -
element -
Returns:
result of calling List.set(int, Object) on _list .
See Also:
List.set(int, java.lang.Object)

size

public int size()
Specified by:
size in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
size in interface java.util.List<E extends net.sf.tostring0.IToString>
Returns:
result of calling List.size() on _list.
See Also:
List.size()

subList

public java.util.List<E> subList(int fromIndex,
                                 int toIndex)
Specified by:
subList in interface java.util.List<E extends net.sf.tostring0.IToString>
Parameters:
fromIndex -
toIndex -
Returns:
result of calling List.subList(int, int) on _list.
See Also:
List.subList(int, int)

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
toArray in interface java.util.List<E extends net.sf.tostring0.IToString>
Returns:
result of calling List.toArray() on _list.
See Also:
List.toArray()

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<E extends net.sf.tostring0.IToString>
Specified by:
toArray in interface java.util.List<E extends net.sf.tostring0.IToString>
Type Parameters:
T -
Parameters:
a -
Returns:
result of calling List.toArray(Object[]) on _list.
See Also:
java.util.List#toArray(T[])

getList

protected java.util.Collection<E> getList()
Returns:
the actual list as a Collection

setList

protected void setList(java.util.List<E> list)
Used only by Object.clone(). TODO If we implement that method in this class, we can make this private.

Parameters:
list - the list to set


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.