unbbayes.prs
Class Node.SetList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by unbbayes.prs.Node.SetList<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess
Enclosing class:
Node

public class Node.SetList<E>
extends ArrayList<E>

This is just an ArrayList which does not allow duplicate elements

Author:
Shou Matsumoto
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Node.SetList()
          Constructs an empty list with an initial capacity of ten.
Node.SetList(Collection c)
          Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.
Node.SetList(int initialCapacity)
          Constructs an empty list with the specified initial capacity.
 
Method Summary
 boolean add(E o)
           
 void add(int index, E element)
           
 boolean addAll(Collection<? extends E> c)
           
 boolean addAll(int index, Collection<? extends E> c)
           
 
Methods inherited from class java.util.ArrayList
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, 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

Node.SetList

public Node.SetList()
Constructs an empty list with an initial capacity of ten.


Node.SetList

public Node.SetList(Collection c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. The ArrayList instance has an initial capacity of 110% the size of the specified collection.

Parameters:
c - the collection whose elements are to be placed into this list.
Throws:
NullPointerException - if the specified collection is null.

Node.SetList

public Node.SetList(int initialCapacity)
Constructs an empty list with the specified initial capacity.

Parameters:
initialCapacity - the initial capacity of the list.
Throws:
IllegalArgumentException - if the specified initial capacity is negative
Method Detail

add

public boolean add(E o)
Specified by:
add in interface Collection<E>
Specified by:
add in interface List<E>
Overrides:
add in class ArrayList<E>

add

public void add(int index,
                E element)
Specified by:
add in interface List<E>
Overrides:
add in class ArrayList<E>

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface List<E>
Overrides:
addAll in class ArrayList<E>

addAll

public boolean addAll(int index,
                      Collection<? extends E> c)
Specified by:
addAll in interface List<E>
Overrides:
addAll in class ArrayList<E>


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.