org.omnaest.utils.structure.collection.list.adapter
Class ListToSetAdapter<E>
java.lang.Object
org.omnaest.utils.structure.collection.CollectionAbstract<E>
org.omnaest.utils.structure.collection.set.SetAbstract<E>
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
ListToSetAdapter
public ListToSetAdapter(List<E> list)
- Constructor
- Parameters:
list -
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.