org.omnaest.utils.structure.collection.list.adapter
Class ListToSetAdapter<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.list.adapter.ListToSetAdapter<E>
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, Set<E>
Direct Known Subclasses:
IdentityArrayListBasedSet

public class ListToSetAdapter<E>
extends SetAbstract<E>

Defines a Set operating on a given List. The changes on the Set will be populated to the List and vice versa.

Author:
Omnaest
See Also:
Set, SetAbstract, Serialized Form

Constructor Summary
ListToSetAdapter(List<E> list)
          Constructor
 
Method Summary
 boolean add(E element)
           
 boolean contains(Object o)
           
 Iterator<E> iterator()
           
 boolean remove(Object o)
           
 int size()
           
 String toString()
           
 
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
 
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

ListToSetAdapter

public ListToSetAdapter(List<E> list)
Constructor

Parameters:
list -
Method Detail

contains

public boolean contains(Object o)

iterator

public Iterator<E> iterator()

remove

public boolean remove(Object o)

size

public int size()

add

public boolean add(E element)

toString

public String toString()
Overrides:
toString in class CollectionAbstract<E>


Copyright © 2013. All Rights Reserved.