fulmine.util.collection
Class CoalescingCollection<E extends IAddressable>

java.lang.Object
  extended by fulmine.util.collection.AbstractCoalescingCollection<E>
      extended by fulmine.util.collection.CoalescingCollection<E>
Type Parameters:
E - the element type this collection operates with, a sub-class of IAddressable
All Implemented Interfaces:
Iterable<E>, Collection<E>

public final class CoalescingCollection<E extends IAddressable>
extends AbstractCoalescingCollection<E>

A Collection implementation that is backed by an internal map. The internal map is used to ensure that items are coalesced. Items added to this collection are not stored in insertion order.

This class is not thread aware and is not thread safe.

Author:
Ramon Servadei

Field Summary
 
Fields inherited from class fulmine.util.collection.AbstractCoalescingCollection
data
 
Constructor Summary
CoalescingCollection()
          Standard constructor that creates the collection with the default size of 2
CoalescingCollection(Collection<? extends E> other)
          Constructor that populates this collection using the elements of the argument collection.
CoalescingCollection(int size)
          Constructor that creates the collection with the initial size
 
Method Summary
 
Methods inherited from class fulmine.util.collection.AbstractCoalescingCollection
add, addAll, clear, contains, containsAll, equals, getSystemIdentity, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoalescingCollection

public CoalescingCollection()
Standard constructor that creates the collection with the default size of 2


CoalescingCollection

public CoalescingCollection(int size)
Constructor that creates the collection with the initial size

Parameters:
size - the initial size for the collection

CoalescingCollection

public CoalescingCollection(Collection<? extends E> other)
Constructor that populates this collection using the elements of the argument collection.

Parameters:
other - the collection of elements to add to this


Copyright © 2007-2009. All Rights Reserved.