org.omnaest.utils.structure.collection.set
Class SetComposite<E>

java.lang.Object
  extended by org.omnaest.utils.structure.collection.CollectionAbstract<E>
      extended by org.omnaest.utils.structure.collection.set.SetAbstract<E>
          extended by org.omnaest.utils.structure.collection.set.SetComposite<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, Set<E>

public class SetComposite<E>
extends SetAbstract<E>

Composite Set consisting of multiple given Set instances of the same type

The add(Object) method will add new elements to the Set with the smallest size.

Author:
Omnaest
See Also:
SetUtils.composite(Collection), Serialized Form

Constructor Summary
SetComposite(Collection<Set<E>> setCollection)
           
SetComposite(Set<E>... sets)
           
 
Method Summary
 boolean add(E e)
           
 boolean contains(Object o)
           
 Iterator<E> iterator()
           
 boolean remove(Object o)
           
 int size()
           
 
Methods inherited from class org.omnaest.utils.structure.collection.set.SetAbstract
equals, hashCode
 
Methods inherited from class org.omnaest.utils.structure.collection.CollectionAbstract
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

SetComposite

public SetComposite(Set<E>... sets)
Parameters:
sets -
See Also:
SetComposite

SetComposite

public SetComposite(Collection<Set<E>> setCollection)
Method Detail

size

public int size()

contains

public boolean contains(Object o)

iterator

public Iterator<E> iterator()

add

public boolean add(E e)

remove

public boolean remove(Object o)


Copyright © 2013. All Rights Reserved.