jwutil.collections
Class FlattenedCollection

java.lang.Object
  extended by java.util.AbstractCollection
      extended by jwutil.collections.FlattenedCollection
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection

public class FlattenedCollection
extends java.util.AbstractCollection

Returns a collection view of a flattened collection. (Elements that are collections are replaced by their contained elements.)

Version:
$Id: FlattenedCollection.java 1934 2004-09-27 22:42:35Z joewhaley $
Author:
jwhaley

Constructor Summary
FlattenedCollection(java.util.Collection c2)
           
 
Method Summary
 boolean add(java.lang.Object o)
           
 boolean addAll(java.util.Collection c2)
           
 void clear()
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 boolean removeAll(java.util.Collection c2)
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, remove, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

FlattenedCollection

public FlattenedCollection(java.util.Collection c2)
Method Detail

size

public int size()
Specified by:
size in interface java.util.Collection
Specified by:
size in class java.util.AbstractCollection

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Overrides:
clear in class java.util.AbstractCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection
Overrides:
isEmpty in class java.util.AbstractCollection

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection
Overrides:
add in class java.util.AbstractCollection

addAll

public boolean addAll(java.util.Collection c2)
Specified by:
addAll in interface java.util.Collection
Overrides:
addAll in class java.util.AbstractCollection

removeAll

public boolean removeAll(java.util.Collection c2)
Specified by:
removeAll in interface java.util.Collection
Overrides:
removeAll in class java.util.AbstractCollection

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in class java.util.AbstractCollection


Copyright © 2004-2008 SUIF Compiler Group. All Rights Reserved.