blackboard.base
Class BbList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by blackboard.base.SharableArrayList<E>
                  extended by blackboard.base.BbList<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess
Direct Known Subclasses:
BbDeleteTrackingList

Deprecated. Since 8.0. Use List instead

@Deprecated
public class BbList<E>
extends SharableArrayList<E>

Generic list class for a collection of objects. While this list can be used to store any generic set of objects, it can be created such that it enforces the type of objects that can be added/set within the list. In addition, it also exposes the filtering functionality provided by ListFilter.

Since:
Bb 6.0
See Also:
List, Serialized Form

Nested Class Summary
static class BbList.Iterator<X>
          Deprecated. A custom extension of FilteringIterator that can be retrieved from any BbList object using getFilteringIterator() or getFilteringIterator(ListFilter).
 
Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
BbList()
          Deprecated. Default Constructor.
BbList(java.lang.Class<?> typeClass)
          Deprecated. Constructs a BbList designated to only accept objects that are instances of the object represented by the provided Class value for addition to the list.
BbList(java.util.Collection<? extends E> c)
          Deprecated. Constructs a new list based on a shallow copy of the incoming collection
 
Method Summary
 boolean add(E obj)
          Deprecated. Overrides add() in parent to enforce type safety of this list.
 void add(int index, E obj)
          Deprecated. Overrides add() in parent to enforce type safety of this list.
 BbList<E> getFilteredSubList(ListFilter filter)
          Deprecated. Returns a sublist containing only those elements that meet the given filter's requirements.
 BbList.Iterator<E> getFilteringIterator()
          Deprecated. Returns a BbList.Iterator for this list with no applied filters.
 BbList.Iterator<E> getFilteringIterator(ListFilter filter)
          Deprecated. Returns a BbList.Iterator for this list with the given filter applied.
 E set(int index, E obj)
          Deprecated. Overrides set() in parent to enforce type safety of this list.
 
Methods inherited from class blackboard.base.SharableArrayList
debug, getSubList
 
Methods inherited from class java.util.ArrayList
addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

BbList

public BbList()
Deprecated. 
Default Constructor. Constructs a list that does not enforce type safety and can accept any type of object as a member.


BbList

public BbList(java.lang.Class<?> typeClass)
Deprecated. 
Constructs a BbList designated to only accept objects that are instances of the object represented by the provided Class value for addition to the list. Any attempt to add objects of a different type will result in an exception being thrown.

An example declaration of a BbList designed to only contain object of type Integer:

 BbList list = new BbList( Integer.class );
 list.add( Integer.valueOf( 1 ) );  <-- successful
 list.add( new Float( 1.0 ) );  <-- throws IllegalArgumentException
 

Parameters:
typeClass - an instance of Class that represents the type of object that can be added to the list.

BbList

public BbList(java.util.Collection<? extends E> c)
Deprecated. 
Constructs a new list based on a shallow copy of the incoming collection

Method Detail

add

public boolean add(E obj)
            throws java.lang.IllegalArgumentException
Deprecated. 
Overrides add() in parent to enforce type safety of this list.

Specified by:
add in interface java.util.Collection<E>
Specified by:
add in interface java.util.List<E>
Overrides:
add in class java.util.ArrayList<E>
Parameters:
obj - the Object to add to the list. The provided value should be of the type provided in the constructor.
Throws:
java.lang.IllegalArgumentException - if the element being added is not an instance of the Class provided in the constructor.

add

public void add(int index,
                E obj)
Deprecated. 
Overrides add() in parent to enforce type safety of this list.

Specified by:
add in interface java.util.List<E>
Overrides:
add in class java.util.ArrayList<E>
Parameters:
index - the index at which the specified element is to be inserted.
obj - the Object to add to the list. The provided value should be of the type provided in the constructor.
Throws:
java.lang.IllegalArgumentException - if the element being added is not an instance of the Class provided in the constructor.

set

public E set(int index,
             E obj)
Deprecated. 
Overrides set() in parent to enforce type safety of this list.

Specified by:
set in interface java.util.List<E>
Overrides:
set in class java.util.ArrayList<E>
Parameters:
index - the index at which the specified element is to be set.
obj - the Object to set in the list. The provided value should be of the type provided in the constructor.
Throws:
java.lang.IllegalArgumentException - if the element being set is not an instance of the Class provided in the constructor.

getFilteringIterator

public BbList.Iterator<E> getFilteringIterator()
Deprecated. 
Returns a BbList.Iterator for this list with no applied filters. Once returned, filters can be added to the iterator using the method FilteringIterator.addFilter(ListFilter).

Returns:
a BbList.Iterator over the elements in this list in proper sequence

getFilteringIterator

public BbList.Iterator<E> getFilteringIterator(ListFilter filter)
Deprecated. 
Returns a BbList.Iterator for this list with the given filter applied. Once returned, additional filters can be added to the iterator using the method FilteringIterator.addFilter(ListFilter).

Parameters:
filter - the ListFilter that should be used to filter values in this list.
Returns:
a BbList.Iterator over the elements in this list in proper sequence

getFilteredSubList

public BbList<E> getFilteredSubList(ListFilter filter)
Deprecated. 
Returns a sublist containing only those elements that meet the given filter's requirements. The sublist has the same ordering as the original list.

Parameters:
filter - the ListFilter that should be used to filter values in this list.
Returns:
a new BbList that does not contain those elements that did not pass the given filter.


Copyright 2011 Blackboard, Inc. All Rights Reserved.